Forum Discussion
Switch condition adding color on rows
- 5 years ago
Hi POWER_MI ,
Since you are using measures to calculate, I still think you need to create each color format for each measure:
Color_R1 = VAR _step = SELECTEDVALUE ( Feuil1[STEP] ) RETURN SWITCH ( TRUE (), ( _step = 1 || _step = 2 || _step = 3 ), "green", _step = 5, "orange" )Color_R2 = VAR _step = SELECTEDVALUE ( Feuil1[STEP] ) RETURN SWITCH ( TRUE (), _step = 1, "green", _step = 4, "orange" )Color_R3 = VAR _step = SELECTEDVALUE ( Feuil1[STEP] ) RETURN SWITCH ( TRUE (), _step = 2, "green", _step = 4, "orange", _step = 7, "red" )Attached the file in the below, hopes to help you.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi v-yingjl
You can find detail here
Here the Values is Number of R1, Number of R2 and Number of R3
We used three mesure to calculte this
mesure 1=CALCULATE( COUNT('table'[column]), 'table'[column] IN "R1")
mesure 2=CALCULATE( COUNT('table'[column]), 'table'[column] IN "R2")
mesure 3=CALCULATE( COUNT('tablae[column]), 'table'[column] IN "R3")
Is it possible to make one Mesure to calculate number R1 and R2 and R3?
Also the Value on table will be number of R1,R2,R3 depeding on STEP i mean
if step 1 && 'table'[column]="R1" color Green
if step 2 && 'table'[column]="R1" color Green
if step 3 && 'table'[column]="R1" color Green
if step 4 && 'table'[column]="R1" color ORANGE
if step 5 && 'table'[column]="R1" color ORANGE
if step 6 && 'table'[column]="R1" color RED
this results need
you can find Power Bi project in this Link ( you click on Telecharger le fichier " donwlowd file
you can update file Power Bi and sent it
Link to download file : click here
- v-yingjl5 years agoCommunity Support
Hi POWER_MI ,
Since you are using measures to calculate, I still think you need to create each color format for each measure:
Color_R1 = VAR _step = SELECTEDVALUE ( Feuil1[STEP] ) RETURN SWITCH ( TRUE (), ( _step = 1 || _step = 2 || _step = 3 ), "green", _step = 5, "orange" )Color_R2 = VAR _step = SELECTEDVALUE ( Feuil1[STEP] ) RETURN SWITCH ( TRUE (), _step = 1, "green", _step = 4, "orange" )Color_R3 = VAR _step = SELECTEDVALUE ( Feuil1[STEP] ) RETURN SWITCH ( TRUE (), _step = 2, "green", _step = 4, "orange", _step = 7, "red" )Attached the file in the below, hopes to help you.
Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- POWER_MI5 years agoPost Patron
Resolved thanks
https://community.powerbi.com/t5/Translated-Spanish-Desktop/si-Condition-Color/m-p/1496725#M145917