dax calculation for last N days

0 votes
statusdate

23/06/2020 (today date)

22/06/2020

20/06/2020

19/06/2020

18/06/2020

how to write a dax cal for Last N days

for example: user select last 3 days

output:  19/06/2020

             18/06/2020

              -------------
Jun 25, 2020 in Power BI by vnk
• 390 points
4,186 views

1 answer to this question.

0 votes

Hi, @Vnk,

Regarding your above query, you can follow something like this:

Var Last_Date = LASTDATE( Table name[Date])

Return

CALCULATE( [Total Transaction], 

Filter(All (Dates),

 Dates[Date]> Last_Date = N && 

Dates[Date] <= Last_Date)) 
answered Jun 30, 2020 by Gitika
• 65,770 points

Related Questions In Power BI

0 votes
1 answer

Dax code for calculated columns

I would recommend you to adjust the ...READ MORE

answered Oct 22, 2018 in Power BI by Hannah
• 18,520 points
1,158 views
0 votes
1 answer

Show orders from past n days in Power BI?

HI banu, Create a column like below, diff = ...READ MORE

answered Apr 8, 2019 in Power BI by Cherukuri
• 33,030 points
953 views
0 votes
0 answers

DAX Calculations for dynamically changing value

2 requirements: please help below scenarios I HAVE ...READ MORE

Dec 3, 2019 in Power BI by anonymous
• 18,520 points
1,040 views
0 votes
1 answer

how to write dax calculation Power bi

Hi, @vnk You can make use of this ...READ MORE

answered Aug 5, 2020 in Power BI by code_Damon
1,083 views
+3 votes
2 answers

Combine tables in Power BI

You can also achieve this using a ...READ MORE

answered Oct 5, 2018 in Power BI by lina
• 8,220 points

edited Oct 11, 2018 by Kalgi 2,487 views
0 votes
1 answer

Power Bi Dax Table

You need to wrap the numbers in ...READ MORE

answered Oct 5, 2018 in Power BI by Kalgi
• 52,350 points
1,178 views
0 votes
2 answers

Power BI Dax Multiple IF AND Statements

HI I have Column Patient 12 13 14 15 18 IN Patient=12, 13 Out ...READ MORE

answered May 23, 2019 in Power BI by VNK
18,972 views
0 votes
1 answer

Distinct count filtered by condition using Power BI Dax

Try this, it should work: DistinctCountActiveMonths = CALCULATE( ...READ MORE

answered Oct 5, 2018 in Power BI by Kalgi
• 52,350 points
37,685 views
0 votes
1 answer

DAX Calculation the Max for a Group.

You can try this out:  Desired Output=CALCULATE(MAX([Check]), ...READ MORE

answered Sep 25, 2020 in Power BI by Gitika
• 65,770 points

edited Sep 25, 2020 by Gitika 5,250 views
0 votes
1 answer

last 10 days data based on Date&time

Hi, @Vnk, Regarding your query, you have to ...READ MORE

answered Jun 4, 2020 in Power BI by Gitika
• 65,770 points
3,604 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP