Forum Discussion
Anonymous
3 years agoNot applicable
Dynamic target - coloring measure
Hi, I have a Target table for each KPI. Each KPI is a measure created in Power BI. Now I create a coloring measure for each KPI and hard code the target. How to create a dynamic target measure?
Color_KPI1 =
VAR currProduct = SELECTEDVALUE ( Dim_Product[Product] )
VAR currCountry = SELECTEDVALUE ( Dim_Country[Country] )
RETURN IF ( currProduct = "A" && currCountry = "Canada" , IF ( [KPI1] >=1800, "Green4", "Red"),
IF ( currProduct = "A" && currCountry = "US" , IF ( [KPI1] >=1500, "Green4", "Red"),
IF ( currProduct = "B" && currCountry = "Canada" , IF ( [KPI1] >=1654, "Green4", "Red"),
IF ( currProduct = "B" && currCountry = "US" , IF ( [KPI1] >=1880, "Green4", "Red"),
BLANK() )))
2 Replies
- amitchandakSuper User
Anonymous , You can use numeric parameters in place 1800, 1500 etc. May you need more than one
https://docs.microsoft.com/en-us/power-bi/desktop-what-if
more example
TOPN with Numeric Parameter -https://youtu.be/cN8AO3_vmlY?t=26448
- AnonymousNot applicable
Hi amitchandak , how can I link the a measure with the Target table?