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
sdukes
Helper I
Helper I

Column Filtering

Hello, I would like to set up a slicer that turns on/off differnt columns in graphs ( across the report).

 

My current example is that I have 7 columns $ ammount graphed along the Y axis vs. Months along the x axis.

I want my user to be able to select which columns they want to see graphed and which ones they don't want to see with the click of a button. 

Any thoughts/suggestions are appreciated! thank you.

8 REPLIES 8
v-lionel-msft
Community Support
Community Support

Hi @sdukes ,

 

Please refer to the video.

Power BI - Dynamic Columns in a Table 

 

Best regards,
Lionel Chen

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

@v-lionel-msft ,

 

Thank you for your response - this is deifinitely helpful but what I am looking for is a little more dynamic.. I will update if I find a solution!

 

Shmuel

v-lionel-msft
Community Support
Community Support

Hi @Greg_Deckler , 

 

I remember you have an answer to this question, but I can't find it, maybe you can help him.

 

Best regards,
Lionel Chen

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

amitchandak
Super User
Super User

@sdukes , I doubt easily possible. Bookmark is on option. Second, in each measure, you check if they are selected they display value or display blank()

 

Refer: https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive

 

This one is Choose measure but you have to use like a switch value or blank

https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...

@amitchandak,

 

What I'm getting from this is that if I can set up an equation that is based on a slicer or a table or something else (bookmarks, etc.) 

and the equation is something like:

 

if(isSelected("ColumnName") = False) 

  value of new column = 0

end

 

so that any time something is not selected the column value is 0, and it won't overcrowd the graph.

 

I'm not exactly certain how to design the isSelected aspect, but this should work.

Hi @sdukes ,

 

Has your problem been solved?

Maybe you can do like this.

1. Create a measure.

Measure = 
IF(
    ISFILTERED('Table'[Column]),
    1,0
)

2. Add this measure to the filter.

ff10.PNG

When measure is 1, if this column is not added to the chart, the chart is blank,

The visual will be blank if the column is not added to the visual when the measure is 1.

 

Best regards,
Lionel Chen

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

Lionel,

 

Thank you again for another nice solution - I really got my hopes up for this one..

 

The goal I'm trying to accomplish differently, is that when isfiltered fails, it turns off the whole visual - I just want it to turn off that specifc column within the visual.

 

Thanks again,

Shmuel

Hi @sdukes ,

 

Or like this?😂

Please refer to my .pbix file.

Measure = 
IF(
    ISFILTERED(Sales[Brand]),
    BLANK(),
    SUM(Sales[Sale 2015])
)

j5.PNG

 

Best regards,
Lionel Chen

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

 

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.