Skip to main content

Power BI

Needs Votes

Can we have the What-If Parameters made usable in calculated columns in tables as well as in Measures?

Vote (12) Share
's profile image

on 09 Nov 2018 22:30:34

What-If Parameters seem only to be usable in Measures. Can we have them made usable in formulas in calculated table columns?
This would allow them to be used to set calculated dimensions for use in visuals as well as measures.

Comments (2)
's profile image Profile Picture

Paul Cooper on 06 Jul 2020 00:01:49

RE: Can we have the What-If Parameters made usable in calculated columns in tables as well as in Measures?

I am trying to map non-Top N categories to "Other Categories" in DAX with a user-selectable Top N value. I can do it with a hardcoded Top N number but because the What-If Parameter cannot be used in calculated fields I cannot have the Top N value user-selectable. I am struggling to try and find a different method: I have tried "Enabled Load" on a Query Parameter but I can't seem to use that in DAX.

's profile image Profile Picture

Power BI User on 05 Jul 2020 23:40:01

RE: Can we have the What-If Parameters made usable in calculated columns in tables as well as in Measures?

Yes ... I believe in a Measure, aggregation happens first then a parameter is applied.
It would be useful to have a 'Calculation Parameter' that is applied first to every record. Doing so would let us create dynamic grouping, i.e., sum up all A values for cases Where B > parameter, for example.