March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
21 | |
14 | |
11 | |
6 | |
5 |
User | Count |
---|---|
27 | |
23 | |
20 | |
13 | |
10 |