Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ajayemmadi1
Helper I
Helper I

DAX expression for Last 90 days Sales value for every month.

Hello Guy's,

I am looking for last 90 days Sale Value for every month. I could able to achieve only last 90 days amount of current month but not for every month. Can anyone help me out in writing a DAX expression for the same issue. I am expecting it as per the below format.

image_2019_07_08T05_17_36_140Z.png

 

Regards
Ajay Emmadi

1 ACCEPTED SOLUTION
AiolosZhao
Memorable Member
Memorable Member

Hi @ajayemmadi1 ,

 

Maybe my solution is a little stupid, I assume that you have a index for your month sort like below:

DAX expression for Last 90 days Sales value for every month.PNG

 

Measure 2 = CALCULATE(SUM(Table6[Sales]),FILTER(ALL(Table6),Table6[Index] <= MAX(Table6[Index]) && Table6[Index] >= MAX(Table6[Index]) - 2))

Please try.

 

Aiolos Zhao





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
Balraj
New Member

Orders last 90 days =
CALCULATE(
[Orders],
DATESINPERIOD(
'Date'[Date],
MAX('Date'[Date]),
-90,
DAY
)
)
AiolosZhao
Memorable Member
Memorable Member

Hi @ajayemmadi1 ,

 

Maybe my solution is a little stupid, I assume that you have a index for your month sort like below:

DAX expression for Last 90 days Sales value for every month.PNG

 

Measure 2 = CALCULATE(SUM(Table6[Sales]),FILTER(ALL(Table6),Table6[Index] <= MAX(Table6[Index]) && Table6[Index] >= MAX(Table6[Index]) - 2))

Please try.

 

Aiolos Zhao





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.