Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

How to filter which columns are shown

Hello PBI-Community,

 

i have a table that looks something like this:

 

RegionCostCalculated_Col1Calculated_Col2
Europe100xx
Asia200xx

 

What I want to implement is a slicer with the two elements "Calculated_Col1" and "Calculated_Col2" in it and the table above should only show the columns Region, Cost and the in the slicer selected column(s). Couldn“t figure out how to do it yet..

 

Thanks for the help

Jakob

  • Anonymous's avatar
    Anonymous
    5 years ago

    Hi Anonymous ,

     

    1.Create a seperate table like

     

    2.Create the following measure

    Filtered result = SWITCH(SELECTEDVALUE('Table (2)'[Slicer]),"Calculated_Col1",[Calculated_Col1],"Calculated_Col2",[Calculated_Col2])

     

    3.The results are as follows. When you filter in the slicer, the results of the filter find changes.

    You can check more details from the attachment.

     

     

    Best Regards,

    Stephen Tao

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

2 Replies