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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.