Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin 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.
Hello,
I have a matrix with the following. I'm trying to highlight values in the Measured column if it is > or < the limits(LSL, USL).The matrix varies by filters so a static value or percentage won't work. I'm missing something on setting up the dax and keep hitting errors.
Any help is appreciated.
Thanks
Solved! Go to Solution.
Ah, yes, sorry I thought your LSL and USL were measures. Since they are columns average aggregation should work, you just need to add brackets;
VAR LowerLimitCheck = Average(vw_Specifications[LSL])-Average(vw_QAresults[VALUE])
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Allison,
That solved it!
A little more work to figure out what to do with a (blank - a value) using this format but this is workable!
Thank you
@PBI_Rookie , You can create a color meausre like the given example
color =
switch ( true(),
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity1" && sum('Table'[Value]) >500,"lightgreen",
FIRSTNONBLANK('Table'[commodity],"NA") ="commodity2" && sum('Table'[Value]) >1000,"lightgreen",
// Add more conditions
"red"
)
color = Switch( True(), [Meausre]<[LSL] , "Red",
[Meausre]>=[LSl] && [Meausre]<[USL],"Orange",
"green"
)
And then use it in conditional formatting with "field value: option
refer: https://radacad.com/dax-and-conditional-formatting-better-together-find-the-biggest-and-smallest-num...
https://docs.microsoft.com/en-us/power-bi/desktop-conditional-table-formatting#color-by-color-values
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
I tried what you suggested Allison.
I replaced your varibles with the names of my tables and columns.
I got the following error
I thought I could solve that by adding Average as my aggregation ex: VAR LowerLimitCheck = Average(vw_Specifications[LSL]-Average(vw_QAresults[VALUE] and get a Var syntax error.
Ah, yes, sorry I thought your LSL and USL were measures. Since they are columns average aggregation should work, you just need to add brackets;
VAR LowerLimitCheck = Average(vw_Specifications[LSL])-Average(vw_QAresults[VALUE])
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com