Forum Discussion
Getting the Previous Value in a Matrix with 7 rows
- 1 year ago
You have interesting data including negative numbers. Calculating a WoW with a mix of positive and negative numbers is extremely subjective. Make sure you agree with the formula.
Here's my (subjective) version:
Rev1 change = var pr1 = CALCULATE(sum(test[Rev1]),DATEADD('Calendar'[Date],-7,DAY)) return divide(sum(test[Rev1])-pr1,abs(pr1),1)However your x axis is driven by a fact date (end of snapshot week) and not by the dimension date as it should be . You will want to correct that too ( or modify the above formula)
This works to calculate the differences but I can't use those Visual Calculations Measures in the Conditional Formatting.
They don't appear in the "which field should we base these on" drop down
- lbendlin1 year ago
Super User
correct, that is a know current limitation
Using visual calculations in Power BI Desktop - Power BI | Microsoft Learn
- MrHajiCoolBreez1 year agoFrequent Visitor
Do you have a workaround or an alternative approach to solve my initial problem?
- lbendlin1 year ago
Super User
Short of materializing your result into a calculated table? Don't think so. But worth a try.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523