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
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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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