Forum Discussion

akowalski's avatar
akowalski
Frequent Visitor
8 years ago
Solved

Show different column based on slicer

Hello,

I have a slicer where i choose the type of a report. If i select years i want the table to show column retailer and if i select retailer i want the table to show years. I tried writing a measure, but it failed. Also creating a column if not working because of reference to a slicer value.

 

I know i can make another column with type (year/retailer) and double the data, but this solution is a last resort.

 

Year/retailer = if(VALUES(comparison[Year or retailer]) = "Ret vs Ret";SELECTCOLUMNS(Sheet1;"Years";Sheet1[Year]);SELECTCOLUMNS(Sheet1;"Retailers";Sheet1[retailer]))

 

 

Thank you for help and sugestions.

  • akowalski's avatar
    akowalski
    8 years ago

    Instead of slicers i used buttons with bookmarks which show different visuals.

3 Replies

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft Employee

    Hi akowalski,

     

    Can you share a sample? A measure needs the context to evaluate. So what's the context column in the table? 

     

    Best Regards,

    Dale

    • akowalski's avatar
      akowalski
      Frequent Visitor

      Instead of slicers i used buttons with bookmarks which show different visuals.