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
dougbert
Helper II
Helper II

Reference conditional formatting background color used in matrix in a filter measure

Hello,

 

I have a matrix where I've conditionally formatted one of the columns like this portion of the matrix:

 

dougbert_0-1648246694383.png

Each of these columns is a measure.  FYTD and LFYTD are SUMs of invoices for the 2 FY's for a given customer. The Gain/Loss ($) column merely finds the difference between this FY and last FY.  The conditionally formatted Gain/Loss (%) column uses the DIVIDE function.  All values greater than zero are the same green color (RGB: (0,128,0)). 

 

What I want is to filter to display only the rows that have the solid green color.  Yes, I've tried filtering the Gain/Loss columns to only display rows with values > zero.  This is somehow changing the results in the 2 FY columns.  So, if it's possible, I'd like to just display the green background rows.

 

Is there a way to reference the green color as a filter condition in a measure?

7 REPLIES 7
dougbert
Helper II
Helper II

@Ashish_Mathur  I'm expecting to obtain what I said in my original post:

 

"

 So, if it's possible, I'd like to just display the green background rows.

 

Is there a way to reference the green color as a filter condition in a measure?

"

Which would look similar to this from the Anonymized Matrix if I could reference the green color in a DAX filter measure AND doing so wouldn't change the original values displayed above prior to filtering.

 

dougbert_0-1648659906912.png

 

HI @dougbert,

Did this matrix conditional formatted base on measure expressions?
If that is the case, you can write a new measure(logic: check original measure result and compare with selected items to return flag) and use it on the matrix 'visual level filter' to filter records.

You can create a slicer using an unconnected table field as the source and write DAX expressions to extract the selection and compare it within the new formula.

Applying a measure filter in Power BI - SQLBI

If you are still confused about the coding formula, please share a pbix or some dummy data that keep raw data structure to test.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
dougbert
Helper II
Helper II

Thanks for the reply @Ashish_Mathur 

 

Of course, I can't post my entire company confidential report, but I've anonymized the data in my linked attachment.  I trust it will be enough to understand my question.

Anonymized Matrix 

Access Denied message.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

@Ashish_Mathur  Sorry, I missed one item while granting access.  Please try again.

Hi,

What exact result are you expecting?  Please share that.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hi,

Share the download link of your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.