Forum Discussion
Color column conditions
- 5 years ago
Hi POWER_MI ,
You can create a table like :
Then use the following measure :
Measure 2 = CALCULATE(COUNTA(COLOR_FIELD_TO_ADD[Coulumn]),FILTER(COLOR_FIELD_TO_ADD,NOT(ISERROR(FIND(COLOR_FIELD_TO_ADD[Coulumn],MAX('Table'[ROWS]))))))Set background color for [measure2] by field [colorformat]:
For more details, please refer to the pbix file: https://qiuyunus-my.sharepoint.com/:u:/g/personal/pbipro_qiuyunus_onmicrosoft_com/EYCIfcnfrjNKoZ4x1HCEzPkB5QOxQggIjQVIQdbaS7p3cQ?e=tdyg3j
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
Hi POWER_MI ,
You can create a slicer table for slicer:
Then you can use the following colorformat:
ColorFormat =
IF (
SELECTEDVALUE ( Slicer[Value] ) = "A",
SWITCH (
TRUE (),
MAX ( 'COLOR_FIELD_TO_ADD'[Coulumn] ) IN { "R1", "R2", "R31" }, "Red",
MAX ( 'COLOR_FIELD_TO_ADD'[Coulumn] ) IN { "R2", "R32" }, "Green",
MAX ( 'COLOR_FIELD_TO_ADD'[Coulumn] ) IN { "R21" }, "Pink "
),
IF (
SELECTEDVALUE ( Slicer[Value] ) = "B",
SWITCH (
TRUE (),
MAX ( 'COLOR_FIELD_TO_ADD'[Coulumn] ) IN { "R1" }, "Red",
MAX ( 'COLOR_FIELD_TO_ADD'[Coulumn] ) IN { "R2", "R22", "R31", "R21" }, "Green",
MAX ( 'COLOR_FIELD_TO_ADD'[Coulumn] ) IN { "R32" }, "Pink "
),
SWITCH (
TRUE (),
MAX ( 'COLOR_FIELD_TO_ADD'[Coulumn] ) IN { "R1" }, "Red",
MAX ( 'COLOR_FIELD_TO_ADD'[Coulumn] ) IN { "R22" }, "Green",
MAX ( 'COLOR_FIELD_TO_ADD'[Coulumn] ) IN { "R2", "R32", "R31", "R21" }, "Pink"
)
)
)
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai
- POWER_MI5 years agoPost Patron
Hi all,
thanks for your feed back.
This is ok but on the table results we will have 3 rows which equale to If condition
So we will have three rows on dash board table results depanding one Choice A,B C
IF A results will be like
On dashbord results
If B it'w ill be change like
not like
R1 ...
R2
R21
R22
...
thanks