Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I'm trying to calculate a column called Amount 2 which would be Amount * Percent
I want the percent value to come from 'What If' parameter
I also want this to be a part of a new table and hence i have written an addcolumns function.
I want that when i change my 'what if' slicer, it should change Amount 2, but it always resorts to the default value of 20% (0.2)
PBIX File Link:
Calc Table =
VAR Percent1 = 'Percent'[Percent Value]
/*
Percent value comes from my What if paramter
Percent Value = SELECTEDVALUE('Percent'[Percent], 0.2)
Percent = GENERATESERIES(CURRENCY(0), CURRENCY(1), CURRENCY(0.01))
*/
RETURN
ADDCOLUMNS('Table',
"Amount 2", 'Table'[Amount] * Percent1)
Result:
Solved! Go to Solution.
Hi @klehar ,
Because the value of what if parameter is dynamic, multiplying the value of what if by the value of another column can only create a measure .
Amount 2 = SUM('Table'[Amount ])*'Percent 1'[Percent 1 Value]
If you do not specify a value, it is the default value 0.2 . Otherwise, the specified value is multiplied by the column .
The effect is as shown:
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @klehar ,
Because the value of what if parameter is dynamic, multiplying the value of what if by the value of another column can only create a measure .
Amount 2 = SUM('Table'[Amount ])*'Percent 1'[Percent 1 Value]
If you do not specify a value, it is the default value 0.2 . Otherwise, the specified value is multiplied by the column .
The effect is as shown:
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
113 | |
97 | |
84 | |
67 |