Forum Discussion
Conditional Colouring Bar Chart
- 1 year ago
Hi SuryaDave
You can use disconected table of organization , and keep the visual interactions.+ this tablle will be the source for the slicer :
For the color you can use a DAX with the wanted color HEXA codes ( i used names of colors just to show the logic) :
Color =
if (SELECTEDVALUE(Sheet1[Organisation])= "State Level", "Green",
IF(SELECTEDVALUE(Sheet1[Organisation]) IN( VALUES(Organization[Organisation])),"Pink", "Grey" ))Result :
The pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
- 1 year ago
Hi SuryaDave
You can use the method of "play role relationship".
Create a inactive relationship without your table and organizations :For other visualizations that need to be filtered you can use the "Userelationship" function to make the relationship active .
Like :Filtered_measure = CALCULATE(AVERAGE(Sheet1[Avg Values]),USERELATIONSHIP(Organization[Organisation],Sheet1[Organisation]))Result:
The updated pbix is attached
If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.
Hi,
Because of the disconnected what is it that you want to do but are unable to do?
hi Ashish_Mathur - thanks for your response and question ...
So, basically, in comparing it with my real world scenario, assume that I have few product categories for each city, so that organisation slicer will also filter another chart which has products listed.
So, that orgnisation slicer selection should change colour of bar chart and also same filter should also filter another to only display products for the city that has been selected through organisation slicer - hope that makes sense ...
- Ashish_Mathur1 year agoSuper User
Hi,
Share the download link of the powerBI file with a 2 visual set up and via a text box, just narrate the requirement there.
- SuryaDave1 year agoHelper I
hi Ashish_Mathur sure - will do it in about next 6 hours - really appreciate your response
- SuryaDave1 year agoHelper I
Hi Ashish,
Apologies for late response - was travellingPlease see attached updated PBI file with tab explanation that shows the problem statement and solution that I am trying to work out - hope this will give you better clarity ...
thanks again ...Surya
- Ashish_Mathur1 year agoSuper User
This will have to be done with a disconnected table.