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
3,654 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,910 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,570 points
845 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
620 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,570 points
822 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
776 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,138 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,360 points
961 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,490 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,360 points
37,007 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,910 points

edited Sep 25, 2020 by Gitika 4,660 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,910 points
3,087 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