Forum Discussion
conditional formatting based on text from data object on target column
- 3 years ago
Try this ....
Click here to download a solurtion
How it works ...
Create a target table ...
Creates an actutals table
Build relationship
Create dax measures
Green RAG = "green"Amber RAG = "orange"Green RAG = "green"Actuals RAG =var greentarget = SELECTEDVALUE(Targets[Green])var redtarget = SELECTEDVALUE(Targets[Red])var actual = SUM(Acutals[Amount])RETURNSWITCH( TRUE(),actual >= greentarget, "Green",actual < redtarget, "Red","Orange")On the actuals visual clcik on the columnIn conditiomal formating select background colourFormat style = filed value / based on field = Actuals RAGThanks for reaching out for help.
I put in a lot of effort to help you, now please quickly help me by giving kudos.
Remember we are unpaid volunteers and here to coach you with Power BI and DAX skills and techniques, not do the users job for them. So please click the thumbs up and accept as solution button.
If you give someone a fish then you only give them one meal, but if you teach them how to fish then they can feed themselves and teach others for a lifetime. I prefer to teach members on this forum techniques rather give full solutions and do their job. You can then adapt the technique for your solution, learn some DAX skills for next time and soon become a Power BI Super User like me.
One question per ticket please. If you need to extend your request then please raise a new ticket.
You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !
Hi, evano_oruvan ;
You could create a measure as follow:
Measure = IF(SUM('Table'[target])>=RIGHT(MAX('Table'[green]),2)+0,"Green",
IF(SUM('Table'[target])<RIGHT(MAX('Table'[red]),2)+0,"Red","yellow"))
then set conditional format.
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.