Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
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
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 57 | |
| 34 | |
| 33 | |
| 18 | |
| 16 |
| User | Count |
|---|---|
| 67 | |
| 65 | |
| 44 | |
| 30 | |
| 28 |