Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Cezar
Frequent Visitor

Utilizing a slicer to reduce number of columns

Good afternoon

 

I am relatively new to Power Bi and still have lots to learn and I have a question regarding tables such as these ones.

 

Cezar_0-1641899489644.png

Is there a way to add a slicer of a filter of sorts that when I filter by "Draft" only the "Draft % Comp" and the "Draft Forecast Date" remain effectively hiding the "Interim % Complete" and "Interim Forecast Date".

 

While doing some research I saw unpivoting the columns is generally the accepted solution, however that does not work here as it messes up the table:

Cezar_1-1641899882262.png

Thank you for your help

 

Regards

Cezar

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @Cezar ,

 

We often create a option table for the slicer(entering data).

vstephenmsft_0-1642152646533.png

 

Then create a measure to switch.

Measure = SWITCH(SELECTEDVALUE('Table (2)'[Option]),"option 1",[Measure1],"option 2",[Measure2])

vstephenmsft_1-1642152686389.png

vstephenmsft_2-1642152694218.png

 

Hope to help you.

 

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.

 

 

 

View solution in original post

3 REPLIES 3
v-stephen-msft
Community Support
Community Support

Hi @Cezar ,

 

We often create a option table for the slicer(entering data).

vstephenmsft_0-1642152646533.png

 

Then create a measure to switch.

Measure = SWITCH(SELECTEDVALUE('Table (2)'[Option]),"option 1",[Measure1],"option 2",[Measure2])

vstephenmsft_1-1642152686389.png

vstephenmsft_2-1642152694218.png

 

Hope to help you.

 

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.

 

 

 

Cezar
Frequent Visitor

@amitchandak 

 

Each column has the following function initially 

Cezar_0-1641901561183.png

 

and after unpivoting

Cezar_2-1641902007821.png

 

Cezar_1-1641901936299.png

 

amitchandak
Super User
Super User

@Cezar , click on those errors and share

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.