Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Sorry for the confusing title, but could someone help me with the following problem?
I have a graph, which calculates a summed value over time (based on startdate and enddate of that row).
Now I want to conditional format this graph, and show on which dates a limit has been crossed. I've created an IF measure which puts a 1 or 0 whether or not the limit was crossed, but my graph just always shows that the limit has been crossed.
My format measure:
Chart color formatting =
SWITCH( TRUE() ,
[ONVERGUND_ON_TERM] > 0 , "#e01021" ,
[Over limit] > 0 , "#99a12a" ,
"#1fa62b" )
My graph:
My "over limit" measure:
Over limit =
Var _Limit = SELECTEDVALUE( DimADRLimit[LIMIT] )
Return
MAXX( Terminalmgmtinfo , IF( [NETT_TON_ON_TERM] > _Limit , 1 , 0 ) )
The table which shows a specific date when I click on it in the graph:
I think maybe the total column might be the problem, because it's always 1 no matter the individual "over limit" values.
I need the bar in the graph to be yellow if at least one of the individual "over limit" values is 1. I tried with MAXX to make it row specific, but no luck.
Please help!
HI @Noeleke1301,
In fact, your formula not suitable to use with aggregate values. (SELECTEDVALUE function will return blank if you not setting alternate result and use it handle aggregate multiple rows)
When you use it in table visual with other fields, there are some other category fields help expand the aggregated row context and let the formula calculated on the detail row levels to get correctly results.
SELECTEDVALUE function - DAX | Microsoft Learn
Regards,
Xiaoxin Sheng
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 37 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 130 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |