The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello experts,
I want to retrieve the nb_conv_int for the last month so I used PREVIOUS MONTH as you can see below:
Nb_conv M-1:=CALCULATE([Nb_conv_inter];PREVIOUSMONTH(Date_table[Date]))
But, it returns blank value:
I don't know what's going wrong. Here is my data (if you want to help)
Below my data model:
Thanks in advance.
Solved! Go to Solution.
Hi @FranckGbadamass ,
In order to use any time intelligence calculation, you need a well-formed date table. The Date table must satisfy the following requirements:
The result of time intelligence functions has the same data lineage as the date column or table provided as an argument.
Note: The result table includes only dates that exist in the dates column.
Please check your Date column, or use something to replace the PREVIOUSMONTH fumction:
Nb_conv M-1 = CALCULATE([Nb_conv_inter],Filter('Date_table',[Date]<=EOMONTH(MAX('Date_table'[Date]),-1)&&[Date]>=EOMONTH(MAX('Date_table'[Date]),-2)+1))
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I wouldn't use PREVIOUSMOTH as it does not work the way people would expect it to. Instead, use a different function, DATEADD, that does work the way you'd expect. If you want to know how the functions differ, please go to https://dax.guide/previousmonth and https://dax.guide/dateadd and see the examples there (they're interactive).
Hi @FranckGbadamass ,
In order to use any time intelligence calculation, you need a well-formed date table. The Date table must satisfy the following requirements:
The result of time intelligence functions has the same data lineage as the date column or table provided as an argument.
Note: The result table includes only dates that exist in the dates column.
Please check your Date column, or use something to replace the PREVIOUSMONTH fumction:
Nb_conv M-1 = CALCULATE([Nb_conv_inter],Filter('Date_table',[Date]<=EOMONTH(MAX('Date_table'[Date]),-1)&&[Date]>=EOMONTH(MAX('Date_table'[Date]),-2)+1))
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
12 | |
9 | |
6 | |
6 | |
6 |
User | Count |
---|---|
24 | |
14 | |
14 | |
9 | |
7 |