Forum Discussion
Make a calculated column return different dimensions based on parameter selection
- 1 year ago
Hi ExcelUser
Calculated columns aren't affected by slicers since they are calculated during refresh.
I replaced your calculated column with the following measure: (After re-reading your post, your code should work as a measure - NOT a calculated column. The calculated column in your pbix is missing the TRUE() line changing the meaning of the whole SWITCH() statement.)
Review = SWITCH( SELECTEDVALUE('PSI/PC-06 Review Details'[PSI/PC-06 Details]), "Aggregate Review Types", MIN( test_data[REVIEW TYPE] ), "Separate Review Types", MIN( test_data[Full Review Type] ) )Let me know if you have any questions.
Hi ExcelUser
I set up a Field Parameter to replace your 'PSI/PC-06 Review Details' table and renamed it. By using the [Axis] column in the visual makes things a lot easier.
Take a look at Page 2 of my pbix.
https://www.sqlbi.com/articles/fields-parameters-in-power-bi/
https://learn.microsoft.com/en-us/power-bi/create-reports/power-bi-field-parameters