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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
kaushikrao896
New Member

DAX QUERY PREVIOUS MONTH

 How to  write DAX query to return previous month?  for example  Current month is November I want a record for previous Month October? Here is my DAX query

EVALUATE
SUMMARIZECOLUMNS(
Dates[YYYY-MM],
Dates[Mth Year],
\Dates[Default Start Date]
)
ORDER BY
Dates[YYYY-MM] DESC,
Dates[Default Start Date] DESC

 

1 ACCEPTED SOLUTION
PritamA
Frequent Visitor

May be try this ........
CALCULATE(SUM('Table_X'[Column_Y]),
FILTER('Calendar',MONTH('Calendar'[Date]) = MONTH(TODAY())-1))

View solution in original post

1 REPLY 1
PritamA
Frequent Visitor

May be try this ........
CALCULATE(SUM('Table_X'[Column_Y]),
FILTER('Calendar',MONTH('Calendar'[Date]) = MONTH(TODAY())-1))

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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