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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
andreazambon
Helper V
Helper V

Blank graph elements based on ISFILTERED() condition.

Hi there, 

 

in a previous discussion we arrange to hide/show a graph putting a textbox on it, working on the fill color of the textbox:

 

 

Trasparenza_se_filtrato = IF(ISFILTERED(SAPScrapCause[scrap_cause_desc]),"#FFFFFF00","White")

 

 

But the big issue here is that the textbox is still there. I can't click on my columns because in fact i'm clicking the textbox. So no drill-through, details, and so on.

 

 

So, the new question is: Can I color the elements of the graph (columns, values, tags...) always looking at ISFILTERED() condition?

I've tried in "default color" property of my columns, but doesn't works. 

 

Some hints? 

Thanks.

4 REPLIES 4
andreazambon
Helper V
Helper V

Hi @cThennakoon and @v-jianboli-msft , 

 

Now i get the issue -.-

 

Actually, I need this formatting when I sleect from Graph1 a cause. 

But in the file I filtered the field "Cause" in order to show the first 7 causes with the highest sum of kg. So the IF condition is always TRUE, this is why the conditional formatting is apparently not working. 

andreazambon_4-1686843035025.png

 

 

Anyway, I still have a doubt... my textbox is working perfecly with this formulas:

Trasparenza_se_filtrato = IF(ISFILTERED(SAPScrapCause[scrap_cause_desc]),"#FFFFFF00","White")


Messaggio_se_filtrato = IF(ISFILTERED(SAPScrapCause[scrap_cause_desc]),"","Selezionare una causale di sottoprodotto per monitorarne l'andamento.")

 

as you can see here:

andreazambon_0-1686842526237.png

andreazambon_1-1686842569348.png

 

So, I don't understand why this formula suggested by @cThennakoon is not working (please note that I've lift up the textbox)

%DescScrap_TOTScrap_Filtrata = IF(ISFILTERED(SAPScrapCause[scrap_cause_desc])=FALSE,BLANK(), SAPProdScrapCalc[%DescScrap_TOTScrap])

andreazambon_2-1686842847231.png

andreazambon_3-1686842940239.png

 

 

 

 

cThennakoon
Regular Visitor

You can use the below measure in the graph so it will blank the values when not filtered 

 

TotalKgs =
IF(ISFILTERED(Tabella1[Cause])=FALSE,BLANK(),SUM(Tabella1[kg]))
You can find the file I updated test_Conditional_Formatting.pbix
 
v-jianboli-msft
Community Support
Community Support

Hi @andreazambon ,

 

Maybe conditional formatting could help you.

Sorry for that the information you have provided is not making the problem clear to me. If conditional formatting doesn't work, please share more details to help us clarify your scenario.

Please provide me with more details about your table and your problem or share me with your pbix file after removing sensitive data.

 

Refer to:

How to provide sample data in the Power BI Forum

How to Get Your Question Answered Quickly

 

Best Regards,

Jianbo Li

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

Hi @v-jianboli-msft

 

I hope to be fair with my work. I build a sample with no sensible data but the original file is more complex (deeply!)

 

 

In the sample case, conditional formatting added to the columns color works fine.

Using the same criteria on my original file, simply it's not changing the color. 

 

Anyway, in the file we have 2 views. If the filed "Cause" in the first graph is filtered, then I need to see values from the second table. If not, I need to blank the second graph.

 

https://drive.google.com/file/d/1SClPoEIalpUzQKrbYubZaIe3b3tdSVKM/view?usp=sharing 

 

In the original file, this is my configuration:

 

andreazambon_0-1686831084844.png

 

And this is the measure:

Trasparenza_se_filtrato_2 = IF(ISFILTERED(SAPScrapCause[scrap_cause_desc])=FALSE,"#FFFFFF00")

 

 

 

 

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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