Forum Discussion
Dynamic bar color
- 1 year ago
Using the same disconnected table but with the logic in the measure reversed
Disconnected Total Revenue = CALCULATE ( [Total Revenue], TREATAS ( VALUES ( 'Disconnected Category'[Category] ), Category[Category] ) ) Disconnected Conditional Bar Color = IF ( SELECTEDVALUE ( 'Disconnected Category'[Category] ) IN VALUES ( Category[Category] ) && ISFILTERED ( Category ), "red" )Please see the attached pbix
Thanks for your responses, very helpful and I can get it working if I add in a separated table, however the existing slicer is currently used to filter other visuals on the page so I would need a solution that uses the existing slicer.
I can't upload my pbix file due to org data security.
- FBergamaschi1 year ago
Super User
with your existig slicer it is impossible to obtain what you are asking as that will filter automatically the value you select
If this helped, please consider giving kudos and mark as a solution
me in replies or I'll lose your thread
Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page
Consider voting this Power BI idea
Francesco Bergamaschi
MBA, M.Eng, M.Econ, Professor of BI
- Fusilier21 year ago
Helper V
Ah, OK. Thanks for responding.
- FBergamaschi1 year ago
Super User
You are welcome, pls mark as a solution and kudos if you believe anybody deserves it
so others can easily find the answers and possible solutions
Thx
- danextian1 year ago
Super User
Using the same disconnected table but with the logic in the measure reversed
Disconnected Total Revenue = CALCULATE ( [Total Revenue], TREATAS ( VALUES ( 'Disconnected Category'[Category] ), Category[Category] ) ) Disconnected Conditional Bar Color = IF ( SELECTEDVALUE ( 'Disconnected Category'[Category] ) IN VALUES ( Category[Category] ) && ISFILTERED ( Category ), "red" )Please see the attached pbix
- FBergamaschi1 year ago
Super User
danextian very good
I did not notice that the customer was ok with hiding the not selected items in the slicer in the below table.
Very good solution!
- Fusilier21 year ago
Helper V
Thank you so, much. Seems to be working fine.