cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
rakeshhgupta66 Frequent Visitor
Frequent Visitor

Conditional formatting not working when column value in data source is spread to columns in Matrix

Hi

I am facing issue with conditional formating in Matrix visual. I have create hierarachy to enable drill functionality in Power BI. 

Currently, I receive data in the following format and the amount of data that i receive is huge.

Columns name:  country, state, city, score, metrics. number of response

 

My output visual that I have created looks like below .

 metricAmetricBmetricC
Country753
    State682

            City

 

871

 

The value that is visible above is calculated measure (weighted average of response and score). To create this visual i added hierarchy in Rows, in columns i added metric and in values i added calcuated measure (weighted average). 

 

Now the issue I am facing is while doing conditional formatting. I am not able to do conditional formatting at metric level (metricA, B, C). If I do conditional formatting by measure that I created, it is taking all values in the measure for calculating minimum and maximum value. However, I want the series for conditional formatting should be different for metrics A, metric B and metric C.

 

Any help appreciated

1 ACCEPTED SOLUTION

Accepted Solutions
Vvelarde Super Contributor
Super Contributor

Re: Conditial formatting not working when column in data source is selected as columns in Matrix

@rakeshhgupta66 

 

Hi, you can obtain this, using a Conditional Formatting - Format by Field Value (Use the measure)

 

and to assign the colors a measure like this:

 

Colors =
VAR _MAX =
    MAXX ( ALLSELECTED ( TableA[Category] ), [SumLikes] )
VAR _MIN =
    MINX ( ALLSELECTED ( TableA[Category] ), [SumLikes] )
RETURN
    SWITCH ( TRUE (); [SumLikes] = _MAX, "Green", [SumLikes] = _MIN, "Red" )

Img1.png

Regards

 

Victor

Lima - Peru




Lima - Peru
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




2 REPLIES 2
Vvelarde Super Contributor
Super Contributor

Re: Conditial formatting not working when column in data source is selected as columns in Matrix

@rakeshhgupta66 

 

Hi, you can obtain this, using a Conditional Formatting - Format by Field Value (Use the measure)

 

and to assign the colors a measure like this:

 

Colors =
VAR _MAX =
    MAXX ( ALLSELECTED ( TableA[Category] ), [SumLikes] )
VAR _MIN =
    MINX ( ALLSELECTED ( TableA[Category] ), [SumLikes] )
RETURN
    SWITCH ( TRUE (); [SumLikes] = _MAX, "Green", [SumLikes] = _MIN, "Red" )

Img1.png

Regards

 

Victor

Lima - Peru




Lima - Peru
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




rakeshhgupta66 Frequent Visitor
Frequent Visitor

Re: Conditial formatting not working when column in data source is selected as columns in Matrix

Thanks @Vvelarde I was able to implement change using your suggestion. 

 

Regards,

Rakesh.

Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 237 members 2,683 guests
Please welcome our newest community members: