Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

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 AColumn B (What if Value Selection)Column C (difference)
1005050
1355085
16050110

 

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's avatar
    CNENFRNL
    Icon for Community Champion rankCommunity Champion

    Calculated column is static; it doesn't interact with any What-If filter.