Skip to main content

Power BI

New

Add string data type for what-if parameters

Vote (3) Share
Darren Fishell's profile image

Darren Fishell on 29 Jul 2021 19:12:09

Allow what-if parameters + slicers to use strings. This would be great if the values could be populated from the distinct values of a column in the data model, as well.



This would be particularly helpful for cases like letting users switch the date granularity of a chart, by using a string parameter to truncate a date field to a specified date part. 



For instance, parameters could be: Daily, Monthly, Quarterly. 



Then, the calculated column could use this parameter to return dates truncated at different levels. Such as: 



SWITCH(Parameter[Parameter],

"Daily", [Date],

"Monthly, DATE(YEAR([Date]), MONTH([Date]), 1)... etc.

Comments (1)
Darren Fishell's profile image Profile Picture

Darren Fishell on 29 Jul 2021 20:12:52

RE: Add string data type for what-if parameters

This request actually would require different parameter behavior. It would be great if there were a way for user-defined parameters to modify a column of data row by row, enabling the kind of date transformations described above.