Forum Discussion
Problem with month to month calculation quick formula Error message
Hi,
Realised that my problem description was bad so here is an update:
I want to use the quick formula month to month difference formula. Then I get this error in the formula:
Then I get this error:
| Result date | Project | MSEK |
| den 15 Juni 2016 | A | 5 |
den 15 Januari 2016 | A | 6 |
| den 15 Febryary 2016 | A | 4 |
| den 15 Mars 2016 | A | 5 |
7 Replies
- amitchandakSuper User
Mstrande , Not sure I am clear with your issue. But make sure you have created a date table and join it with your date in your transaction table
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/
See if my webinar on Time Intelligence can help: https://community.powerbi.com/t5/Webinars-and-Video-Gallery/PowerBI-Time-Intelligence-Calendar-WTD-YTD-LYTD-Week-Over-Week/m-p/1051626#M184
Appreciate your Kudos.- MstrandeResolver I
- amitchandakSuper User
Mstrande , the column in your table, is that detected as date, if no, make sure it does. Then create a date table. And use that for time intelligence.
Create the date table using the calendar function
- v-eachen-msftCommunity Support
Hi Mstrande ,
You could create a rank column based on your date column at first. Then refer to the following measure to get the result.
Column 2 = VAR a = CALCULATE ( FIRSTNONBLANK ( 'Table'[MSEK], 1 ), FILTER ( 'Table', 'Table'[rank] = EARLIER ( 'Table'[rank] ) - 1 && 'Table'[Project] = EARLIER ( 'Table'[Project] ) ) ) RETURN 'Table'[MSEK] - aHere is my test file for your reference.
- MstrandeResolver I
Hi v-eachen-msft amitchandak !
the quick formula only supports unique date values and I have several MSEK rows on the same date.
Date Project costtype MSEK
20200515 Chair Manhour 5
20200515 Chair Testobject 10
20200415 Chair Manhour 5
20200515 Chair Testobject 10
MSTRANDE