Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.
I have the following calculation in my Power BI shared dataset ‘klima’:
% change MoM/QoQ emissions intensity = var cm = [Carbon intensity scope 1 and 2 tCO2 emissions per MNOK loan total] var pm = CALCULATE([Carbon intensity scope 1 and 2 tCO2 emissions per MNOK loan total], DATEADD(DimDato[Date],-1,MONTH)) var ck = [Carbon intensity scope 1 and 2 tCO2 emissions per MNOK loan total] var pk = CALCULATE([Carbon intensity scope 1 and 2 tCO2 emissions per MNOK loan total], DATEADD(DimDato[Date],-1,QUARTER)) var change_mom = cm - pm var change_qoq = ck - pk var percent_change_mom = DIVIDE(change_mom, pm) var percent_change_qoq = DIVIDE(change_qoq, pk) return if(ISINSCOPE(DimDato[YearQuarter]), percent_change_qoq, if(ISINSCOPE(DimDato[YearMonth]), percent_change_mom, percent_change_qoq))
This calculation works perfectly. Now I’ve created a new Power BI report in Power BI desktop where I want to use this formula. However, the formula doesn’t work in the new report, I’m getting a blank result. It seems that it doesn’t understand the time intelligence of DATEADD, even though I have a relationship with the column DimDato[Date] (from a different table, not the shared dataset). How can I solve this?
One solution is to add the exact same measure to my new Power BI report, then I get the expected result. But that means I’ll have to do this for multiple formulas. This not only takes time but also adds more management overhead.
I hope someone can help me with this issue
Solved! Go to Solution.
@Nina88 , Please make sure there date is selected in the slicer/filter or there is a column from the date tab in the context. Otherwise, dateadd will not be able to find the correct month.
Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
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 :radacad sqlbi My Video Series Appreciate your Kudos.
Hi @Nina88 ,
@amitchandak Thanks for your concern about this case!
And @Nina88 , I see that the DAX you provided uses many variables such as cm, ck, pk and the like, which is a good habit to get into. You could try returning these variables that you have defined, see which one returns a problematic result, and then modify that variable to try to fix the problem.
Best Regards,
Dino Tao
@Nina88 , Please make sure there date is selected in the slicer/filter or there is a column from the date tab in the context. Otherwise, dateadd will not be able to find the correct month.
Why Time Intelligence Fails - Powerbi 5 Savior Steps for TI :https://youtu.be/OBf0rjpp5Hw
https://amitchandak.medium.com/power-bi-5-key-points-to-make-time-intelligence-successful-bd52912a5b...
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 :radacad sqlbi My Video Series Appreciate your Kudos.
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
74 | |
70 | |
70 | |
45 | |
41 |
User | Count |
---|---|
49 | |
46 | |
28 | |
28 | |
28 |