Forum Discussion
Color Changed as per values changed based on condition
I am having measures for calulating Trend. And having 10 KPI's for them having seprate Trend measure each KPI.
For Eaxmple KPI NO 1 : I have prepard Trend Measure is like below
Trend KPI No 1 = [Percentage Archived for KPI NO 1]-[COM Percentage Archived for KPI NO 1]
using this formuals i got Trend values for that KPI. same i have trend values for 10 KPIS which i calculated for every KPI.
But problem i am facing here how to show color based on condition for those trend values.
IF [Trend KPI NO 1] =0 Then color changed to this color code #FFEB9C
IF [Trend KPI NO 1]<0 Then color changed to this color code #FFC7CE
IF[Trend KPI NO 1]>0 Then color changed to this color code #A9D08E
I used below
[Trend KPI NO 1]=
Trend color for KPI NO 1 = SWITCH(TRUE(),[Trend KPI No 1]=0,"Cream Brulee",[Trend KPI No 1]<0,"Pink",[Trend KPI No 1]>0,"Gossip")
but when i applied this measure above card it is showing name of color on card like "Cream Brulee" i want actually color applied to card.
#FFEB9C is for this color "Cream Brulee"
#FFC7CE is for this color "Pink"
#A9D08E is for this color "Gossip".
means when [Trend KPI NO 1] value is changed as per above conditions those color applied to that visulization. Currently i am using Card for showing [Trend KPI NO 1] as per KPI. Same i have [Trend KPI NO 2] for KPI 2 same i need to follow all the KPI.
I already used 'card with state' custom Visual but above scenarion not achivable using that if. please help me out here using DAX or how to achive above scenario . Show me with exmple.
Hi Anonymous,
This is not possible at the card level the condittional formatting of colour is only possyble on the table what you can do is format a table as it is a Card and used the conditional formatting.
Regards,
MFelix
5 Replies
- MFelixSuper User
Hi Anonymous,
This is not possible at the card level the condittional formatting of colour is only possyble on the table what you can do is format a table as it is a Card and used the conditional formatting.
Regards,
MFelix
- AnonymousNot applicable
Hi MFelix Thanks for reply ,
As you suggested i have added table Visual insted of card and changed settings as you showed from background color conditioanl formating for that table visual. but color not chainging at my side for that table visual.
I need to add Trend KPI NO 1 in table visual then conditioanl formating then background conditional formating
need to put Low value , Mid value , Grater value in conditional formating as 0 only or any other. Currently i put 0 for all three as you showed but color not changing.
- v-jiascu-msftMicrosoft Employee
Hi Anonymous,
Did your values change? Could you please share a sample .pbix file?
Best Regards!
Dale
- AnonymousNot applicable
Hi MFelix Thanks it is working for me now colors are chaning now i used table insted of Card visual.
- VvelardeCommunity Champion
Anonymous
Hi, you can put background in Card With States.
Check the images:
Regards
Victor
Lima - Peru