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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

clustered chart conditional formatting

Hello,

 

I want to have dynamic conditional formatting on a clustered chart depending on one condition. Let me show you the data :

MachineResultsMachine category
Asset 112%A
Asset 210%A
Asset 320%B
Asset 413%B
Asset 59%A
Asset 618%C
Asset 721%C
Asset 833%C

 depending of the machine category I have different targets

Machine categoryTarget
A10%
B15%
C20%

I would like to create a clustered chart with conditional formation depending on the category. If I use a slicer to selcet Asset 1 then the target will be 10%, I f I choose asset 8 it would be 20% etc..

I use a color KPI measure usually like this one : color KPI =  if('results'<0.2,"#3FA45B","#DC0D0E").

In this case I would need to compare the value with a conditional column but it does not work. Only measure appears in the DAX formual with IF.

If you have a solution it would be great

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello

 

No it does not answer my question. Finally, I found the solution by creating a conditional column in the same table and creating a measure equal to the average of the value as the target is constant = calculate(average (conditional column)) then I can usie this measure in my formula.

View solution in original post

6 REPLIES 6
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hello

 

No it does not answer my question. Finally, I found the solution by creating a conditional column in the same table and creating a measure equal to the average of the value as the target is constant = calculate(average (conditional column)) then I can usie this measure in my formula.

Hi @Anonymous ,

 

Glad to hear that you have resolved your problem. Thank you for sharing this wonderful solution. Would you please kindly mark your sharing solution as an answer so that it can benefit more users?

 

If you still need help, feel free to ask here.


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
rajulshah
Super User
Super User

Hello @Anonymous,

I am not able to understand the issue. Can you please explain in detail?

Anonymous
Not applicable

Hello,

My problem is really to create a conditional formation based on asset category.

 

Instead of having  a measure like this : 

color Level 1 = if([results]<0.2,"#3FA45B","#DC0D0E")
 
I want to replace the 0.2 value by comparison with a column where the target is defined based on other criteria.
Indeed, if the machine is category A => target will be 0.1 then I will see a graphic like this

.

If I select another asset using a slicer then I would like to have the conditional formationg also changing the value accordingly.

See the different category in the post.

At the end, depending on the results for example 18% if the asset is category A the bar chart will be RED but for the same value of 18 % an asset categorie C the bar chart will be greem

 
 

2019-12-24_15-02-31.jpg

Hi @Anonymous ,

 

We can try to created a measure to meet your requirement:

 

Color = 
IF (
    SUM ( 'Table'[Results] )
        < CALCULATE (
            SUM ( 'Table (2)'[Target] ),
            FILTER (
                ALLSELECTED ( 'Table (2)' ),
                'Table (2)'[Machine category] = SELECTEDVALUE ( 'Table'[Machine category] )
            )
        ),
    "#3FA45B",
    "#DC0D0E"
)

 

5.jpg

 


If it doesn't meet your requirement, Please show the exact expected result based on the Tables that you have shared.


Best regards,

 

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Fabric Monthly Update - May 2024

Check out the May 2024 Fabric update to learn about new features.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.