Forum Discussion
CONDITIONAL FORMATTING WITH FIELD PARAMATERS IN MATRIX
- 2 years ago
Hi NBDOC ,
If field parameters don't work for you, I would go old school. So basically, you create a table that has the name of your measures and use a conditional formula to return the value of a measure depending on what of the value of the measure column from another table. In the image below, Measure in Columns tile is from a column from __MEASURES table which doesn't have relationship Table. What binds them is Actual Budget Diff measure.
Actual Budget Diff = SWITCH ( SELECTEDVALUE ( __MEASURES[Measure] ), "ACT", [ACT], "BUD", [BUD], "DIFF", [DIFF] )It is rather finnicky but should work in most cases. Please see attached pbix for details.
Hi NBDOC ,
You can just modify your formula a bit.
Billing % Var Conditional Formatting =
VAR _a =
CALCULATE (
SUM ( Master[Orig Billing Amount] ),
FILTER (
Master,
Master[Service Dt].[Year]
= MAX ( Master[Service Dt].[Year] ) - 1
)
)
VAR _b =
CALCULATE (
SUM ( Master[Orig Billing Amount] ),
FILTER ( Master, Master[Service Dt].[Year] = MAX ( Master[Service Dt].[Year] ) )
)
RETURN
IF ( _b > _a, "red" )
/*replace red with a different color or a hexadecimal code
samples on this site - https://htmlcolorcodes.com/colors/shades-of-red/ */
Select Field Value in the conditional formatting dialogue box and use this measure.
Hi danextian
This measure is part of a field parameter so conditional formatting option is not listed in the drop down list. . Where can I find the dialogue box you are referring to earlier?
Appreciate your help.
- danextian2 years ago
Super User
Enable Show selected field.
The option to conditionally format a parameter will appear after doing so.