Forum Discussion

ExcelUser's avatar
ExcelUser
Frequent Visitor
1 year ago
Solved

Make a calculated column return different dimensions based on parameter selection

Hi, I would like the user to be able to display either an abbreviated or full Review Type, based on a selection in a slicer they choose. The slicer is based on a parameter I made.   I tried making...
  • gmsamborn's avatar
    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.

     

    MY dummy dashboard.pbix