Forum Discussion
Anonymous
3 years agoNot applicable
Populate a column based on filter from What-if value
Hi everyone, I'm new to using Power BI and I'm running into some problems that I'm hoping somebody could help me with. I've built a report that is a table with values that are being pulled from our database. I would like to perform some row level calculations using what if values that the user would select. For example, if the user select 50 as the value in the filter for the what-if parameter that I've created :
| Column A | Column B (What if Value Selection) | Column C (difference) |
| 100 | 50 | 50 |
| 135 | 50 | 85 |
| 160 | 50 | 110 |
I've generated the What if value:
What_if_Filter = GENERATESERIES(5300000, 6700000, 1)
I tried adding a calculated column , but that didn't work :
Differ = [Column A] - SELECTEDVALUE('What_if_Filter '[What_if_Filter], 0)
All the calculation from this just return the value of [Column A] (I checked the types for both values being subtracted and they're the same)
I then tried adding a quick measure, but that's giving back incorrect numbers, because of the summation I think:
QuickDiff= sum([Column A]) - [What_if_Filter Value]
The above DAX code doesn't work if I remove the sum....I'm hoping somebody would have some insight as to how I can perform the row-level calculations with the What If filter selections.
Thanks!
Calculated column is static; it doesn't interact with any What-If filter.
1 Reply
- CNENFRNL
Community Champion
Calculated column is static; it doesn't interact with any What-If filter.