Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi Team,
I am trying to create the dax for the Maximum date in the previous month. Could you please share your idea?
Solved! Go to Solution.
Hi @Neel98 ,
Hope you have a datedimension table in your data set, if not create that first and create a one to many relationship from your date table to this table and create the below measure.
CALCULATE(
MAX(Report Date),
DATEADD('Date Dimension'[date],-1,MONTH)
)
Regards,
Nikhil Chenna
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
Hi @Neel98 ,
Hope you have a datedimension table in your data set, if not create that first and create a one to many relationship from your date table to this table and create the below measure.
CALCULATE(
MAX(Report Date),
DATEADD('Date Dimension'[date],-1,MONTH)
)
Regards,
Nikhil Chenna
Appreciate with a Kudos!! (Click the Thumbs Up Button)
Did I answer your question? Mark my post as a solution!
So, when you use CALCULATE with MAX and PREVIOUSMONTH, you're instructing Power BI to calculate the maximum date from the previous month based on the dates in your 'date' table. Your measure will dynamically adjust as the current month changes, always showing the maximum date from the previous month.
This DAX measure should work effectively for your requirement.
in my data set upto 31 jan 2024 data have . so..
max prevoius month should be 31 dec 2023
hope this alternative is userful for you
User | Count |
---|---|
11 | |
11 | |
8 | |
6 | |
5 |
User | Count |
---|---|
25 | |
19 | |
16 | |
10 | |
7 |