Forum Discussion
MaxMin On Column Chart
Hello everyone,
i have revenue table and calendar table
total revenues = Sum(Revenue_table[Total])
i wantto conditional format my column chart to look like this in desired color the max number for selected date is green, lowest number is red and the rest to be less focused on with light grey color
i use date column that has dates of everyday
Anonymous You could do something like this:
Measure = VAR __Value = [total revenues] VAR __Table = SUMMARIZE(ALLSELECTED('Table',),[Date],"__Measure",[total revenues]) VAR __Max = MAXX(__Table,[__Measure]) VAR __Min = MINX(__Table,[__Measure]) RETURN SWITCH(TRUE(), __Value = __Max,1, __Value = __Min,2, 3 )Set your conditional color for your Columns to be Rules and set your rules accordingly.
- Anonymous3 years ago
Hi Anonymous ,
I created some data:
Here are the steps you can follow:
1. Create measure.
Measure = SWITCH( TRUE(), MAX('Table'[Amount])=MAXX(ALLSELECTED('Table'),[Amount]),"green", MAX('Table'[Amount])=MINX(ALLSELECTED('Table'),[Amount]),"red", "grey")2. Column – Colors – FX.
3. Enter the Default color interface.
4. Result:
If you need pbix, please click here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
2 Replies
- Greg_Deckler
Community Champion
Anonymous You could do something like this:
Measure = VAR __Value = [total revenues] VAR __Table = SUMMARIZE(ALLSELECTED('Table',),[Date],"__Measure",[total revenues]) VAR __Max = MAXX(__Table,[__Measure]) VAR __Min = MINX(__Table,[__Measure]) RETURN SWITCH(TRUE(), __Value = __Max,1, __Value = __Min,2, 3 )Set your conditional color for your Columns to be Rules and set your rules accordingly.
- AnonymousNot applicable
Hi Anonymous ,
I created some data:
Here are the steps you can follow:
1. Create measure.
Measure = SWITCH( TRUE(), MAX('Table'[Amount])=MAXX(ALLSELECTED('Table'),[Amount]),"green", MAX('Table'[Amount])=MINX(ALLSELECTED('Table'),[Amount]),"red", "grey")2. Column – Colors – FX.
3. Enter the Default color interface.
4. Result:
If you need pbix, please click here.
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly