The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
I have the following table that looks as such
I am using the following formula to count all orders
numOrders = COUNTROWS(AllOrders)
I then calculate the total retailed orders based on whether there is a retail date
Total Retailed = CALCULATE ( [numOrders], FILTER ( 'AllOrders', AND ( NOT ( ISBLANK ( 'AllOrders'[RetailDate] ) ), DATEVALUE(AllOrders[RetailDate]) <= MAX ( BasicCalendarUS[DateKey] ) ) ))
I then calculate the total retailed orders year to date by using this formula
Total Retailed YTD = CALCULATE ( [Total Retailed], FILTER ( 'AllOrders', YEAR( 'AllOrders'[RetailDate] ) = YEAR( MAX ( BasicCalendarUS[DateKey] ) ) ) )
Now what I want is to have it do a month over month calculation to see the difference. I am having trouble picking up a formula that looks to the previous month and subtracts it from the current month to give me the number.
Below is a screenshot of what I am looking for. ( I left out some months for simplicity)
Any help would be greatly appreciated
Thanks!
Derek
Hi @dkbollig,
In my opinion, you can use a calculate column to store the running total, then write a measure to get the running total of previous month and calculate the different between current value and previous.
Regards,
Xiaoxin Sheng
@v-shex-msftSounds like the idea. I can't see any operations in there so that might be something to consider.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
79 | |
76 | |
46 | |
39 |
User | Count |
---|---|
143 | |
115 | |
64 | |
64 | |
53 |