Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hey all,
In our Org we report 1 month in arrers. So I need to write a DAX measure that looks for "recorded date" for the previous month.
Im not sure what if any functions there are in PBI that evaluates current month? I need something to the effect of...
Last month Total = Countrows(This month - 1)
Thanks,
J
Solved! Go to Solution.
@Anonymous , Try with date table
MTD Sales = CALCULATE(countrows(Sales[Table]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(countrows(Sales[Table]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
Hi @Jaydpie ,
First, you must create a relationship between the fact table and the date dimension.
Next, create the above measures in the file.
Here is my test file for your reference.
@Anonymous , Try with date table
MTD Sales = CALCULATE(countrows(Sales[Table]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(countrows(Sales[Table]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :
https://radacad.com/creating-calendar-table-in-power-bi-using-dax-functions
https://www.archerpoint.com/blog/Posts/creating-date-table-power-bi
https://www.sqlbi.com/articles/creating-a-simple-date-table-in-dax/
Hey,
Not sure where to apply these? I have a date table and my data has a "date claim reported" column.
I am a noob to PBI
Hi @Jaydpie ,
First, you must create a relationship between the fact table and the date dimension.
Next, create the above measures in the file.
Here is my test file for your reference.
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
107 | |
99 | |
99 | |
38 | |
37 |
User | Count |
---|---|
157 | |
121 | |
73 | |
73 | |
63 |