Forum Discussion
Conditional Formatting on a text field based on Slicer selections from a separate dataset
Anonymous sure, you can add a measure for the color and then use this measure in conditional formatting of the description, using field value
Color =
IF ( SELECTEDVALUE ( TableSlicer[Column] ) = MAX ( Table[Column] ), "Red" )
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Thank you both parry2k and nandic for your responses.
I am a novice at power bi so my explanations may not be the most concise.
The data in the visual is linked to the data in the slicer by another table, i.e. there are 3 data tables, the one in the middle linking the *visual data* to *slicer data*.
The fields highlighted in the picture are text fields.
Also, the data in the slicer is different from the data to be highlighted i.e. the Description column is different from what the Slicer (Core HT).
Please let me know if any other information would be useful.
- v-easonf-msft6 years ago
Community Support
Hi, Anonymous
Do you mean that these two tables are not directly related to each other?
Is it convenient to show the view of the relationship between your table and the table (using the option insert photos)?
Ex:
Best Regards,
Community Support Team _ Eason- Anonymous6 years agoNot applicable
Hi v-easonf-msft ,
Yes, both tables are not directly related to each other.
All the relationships are not able to fit into one picture but I will post them, hopefully you can follow.
123
- v-easonf-msft6 years ago
Community Support
Hi , Anonymous
Try measure as below :
Measure1 = VAR _cotc = CALCULATETABLE ( VALUES ( 'Brands&COTC'[COTC] ), FILTER ( ALL ( 'Brands&COTC' ), 'Brands&COTC'[COTC] IN FILTERS ( Slicer[slicer_COTC] ) ) ) VAR _sku = CALCULATETABLE ( VALUES ( 'Brands&COTC'[SKU Desc] ), FILTER ( ALL ( 'Brands&COTC' ), 'Brands&COTC'[COTC] IN _cotc ) ) VAR _skureflect = CALCULATETABLE ( VALUES ( 'Brand&SKU'[Description] ), FILTER ( ALL ( 'Brand&SKU' ), 'Brand&SKU'[SKU Desc] IN _sku ) ) VAR _description = CALCULATETABLE ( VALUES ( 'Data Table'[Customer ID] ), FILTER ( ALL ( 'Data Table' ), 'Data Table'[Description] IN _skureflect ) ) RETURN IF ( MAX ( 'Data Table'[Customer ID] ) IN _description, 1, 0 )Then apply it to background conditional formatting.
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.