Forum Discussion
Conditional formatting with multiple column/bar values
Hi,
I'm new with Power bi and i was wondering why power bi let me use conditional formatting in a normal stacked line column chart, but one I add more than one value of my tables to the chart the option of condittional formatting disapears.
I'm trying to represent in the same chart four measures with theis limits filtering their representationes thanks to a dax filter: the first pict is the visual with all measures (120/140, 40/70...) and the second one is with only one but letting me use conditional formatting.
Is there any way to achive the multiple representation with custom conditional formatting for each column measure? Thanks.
13 Replies
- MFelixSuper User
Hi Anonymous ,
This has to do with the setup of the chart when you are using a legend or more than one measure or calculation to make the split between several items the condittional formatting is turn off since each of the categories will have it's own colour.
What exactly is your need, do you want to have a single colour for each of your measures? if that is the case you just need to change each one individually on the data colours:
Or do you want to set the limits for each of the measures you have and get different colours depending on the result of the measures?
- AnonymousNot applicable
I have multiple measures and for each of them specific limits and warnings which I have calculated indivuadully. As you said, I need to apply conditional formatting for each measure with a specific rule depending of their calculated limits, and plot them in the same visual that has the custom filter i made, which allows me represent only one of the multimple measures.
I don't know if I have explained myself properly, my english is not as good as it should.
Thank you.
- MFelixSuper User
Hi Anonymous ,
Not really sure if this is what you need but using a disconnected table with the measure and making them part of the x-axis you are abble to have a single measure to have the condittional formatting working check the image below if this appearance looks good to you or what is missing.
Again if you can share a mockup of your data would be easier to achieve an answer.
- AnonymousNot applicable
Hi Anonymous ,
There are a few considerations to keep in mind when working with conditional table formatting:
- Conditional formatting applies only to the values of Table or Matrix visuals, and doesn't apply to any subtotals, grand totals, or the Total row.
- Any table that doesn't have a grouping is displayed as a single row that doesn't support conditional formatting.
- You can't apply gradient formatting with automatic maximum/minimum values, or rule-based formatting with percentage rules, if your data contains NaN values. NaN means "Not a number," most commonly caused by a divide by zero error. You can use the DIVIDE() DAX function to avoid these errors.
- Conditional formatting needs an aggregation or measure to be applied to the value. That's why you see 'First' or 'Last' in the Color by value example. If you're building your report against an Analysis Service multidimensional cube, you won't be able to use an attribute for conditional formatting unless the cube owner has built a measure that provides the value.
Reference: Use conditional formatting in tables
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- AnonymousNot applicable
Hi Anonymous,
In summary, if I have understood correctly, my problem is that I have multiple data represented in the same visual and conditional formatting is only supoerted to one measure, even if I filter data to represent only one measure at the same time, am I correct?
Sorry for my bad english, and thank you very much.
- MFelixSuper User
Anonymous ,
You are correct on your understanding however there can be some workarounds. What is the type of condittional formatting you need?