Skip to main content

Power BI

New

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

Vote (9) 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

31576b90 256b-4d97-adeb-211a470f7354 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

a57b3e95 65ff-4e00-b143-6a2049f52375 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.