Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Using the Min Number to do conditional formatting

Hello,

 

I have a table where I'm trying to perform conditional formatting. I have a measure where I'm calculating the MIN of the Reprint Rate Column. However, there's something funky going on where there's no relationship to the row and so I can't compare the reprint rate to the Best in Network measure.
Ultimately, I'd like to compare the Reprint Rate against the Best in Network and if its the value then it should be green otherwise red.

Here are the measures:

Best in Network = MINX({[SC01_%], [SC02_%], [SC03_%], [SC04_%], [SC05_%]}, [Value])

Reprint Rate = IFERROR([Reprints]/[__Printed],0)

Reprint Color = IF('Reprints and Printed'[Reprint %] = [Best in Network], 1, 0


Does anyone have any recommendations? THANK YOU IN ADVANCE!

  • Hi Anonymous 

    You can produce your required output by wrapping the table with 'all' to ignore row filter context in Minx function.  

    Minx = minx(all('Table'),'Table'[Reprint Rate])

     Then you can use the conditional formatting on the measure to specify the color as you require.  

    I attach an example pbix file.  

1 Reply

  • Hi Anonymous 

    You can produce your required output by wrapping the table with 'all' to ignore row filter context in Minx function.  

    Minx = minx(all('Table'),'Table'[Reprint Rate])

     Then you can use the conditional formatting on the measure to specify the color as you require.  

    I attach an example pbix file.