The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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
Solved! Go to Solution.
@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.
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
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
@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.
User | Count |
---|---|
17 | |
8 | |
7 | |
6 | |
6 |
User | Count |
---|---|
26 | |
13 | |
12 | |
9 | |
8 |