Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello All,
I'm trying to apply a conditionnal formating to a table where I have 2 Calculation Group:
- One with my measures
- One with Time variation (actual, p-1, and var %)
I want to apply a conditionnal formating to my column "VAR %" and only this one. I want the variation to be red if it's negative and green if positive (and an other of my problem is that i want the reverse for the measure "Cost per Sales" ie: red if positve, green if negative).
In order to do that i've created the measure Conditional Color like that:
Thank you for your help
Hi @claxxx ,
If I understand correctly, the issue is that you want to apply a conditional formatting to make the positive is red and the negative is green. Please try the following methods and check if they can solve your problem:
1.Create a measure. Enter the following DAX formula.
Measure =
var _persales = SELECTEDVALUE('MESURE GROUP'[Mesure])
var _salesvar = SELECTEDVALUE('TIME VAR'[Variation])
RETURN
IF (
_salesvar IN {"ACTUAL", "P-1"},
BLANK(),
IF (
_persales = "Cost per Sales" && _salesvar = "VAR",
BLANK(),
1
)
)
2.Select the INIT KPI values and choose the conditional formatting.
3.Select the measure and set the Rules.
4.The result is shown below.
Best Regards,
Wisdom Wu
Thank you for your answer.
My point was principally to apply a conditionnal formating only to the "VAR %" column.
So for all measures the column "Actual" and "P-1" should maintain without any color, and VAR % have to be the only column with a conditionnal color.
In your result I see that the 3 column "Actual", "P-1", and "VAR %" have the conditional format but I just want VAR % to have it. Do you have a solution to do that?
User | Count |
---|---|
106 | |
85 | |
81 | |
73 | |
71 |
User | Count |
---|---|
111 | |
102 | |
97 | |
74 | |
67 |