Forum Discussion
Conditional Formating both £ Values and % Values
- 5 years ago
Hi Anonymous ,
This is due to the fact that when you are making the change of the % to a FORMAT syntax you are picking up text and not a value so the condittional formatting will not assume the number formatting.
What you need to do is to create a measure exactly like the Slicer_CM but for formatting.
Slicer_CM_Formatting = VAR Mth1 = SELECTEDVALUE ( SelMth_Current[Month] ) VAR Mth2 = SELECTEDVALUE ( SelMth_Prior[Month] ) VAR Fcst1 = SELECTEDVALUE ( SelMth4[Actual] ) VAR Fcst2 = SELECTEDVALUE ( SelMth3[Actual] ) VAR Opt = 0 VAR MthVal = CALCULATE ( SUM ( Profitability_Consolidation[Profit]); Profitability_Consolidation[Period] = Fcst1;Profitability_Consolidation[Month] = Mth1 ) VAR MTDValue = SWITCH ( TRUE(); AVERAGE ( Profitability_Consolidation[Chkfmt] ) = 1 && MthVal <0 ;"Red"; [Slicer_CM] <0; "Red" ) RETURN MTDValueNow just use this measure has your formatting value, the "RED" can be change by any colour you want if you use a HEX colourings similar to this "#000000".
Hi Anonymous ,
This is due to the fact that when you are making the change of the % to a FORMAT syntax you are picking up text and not a value so the condittional formatting will not assume the number formatting.
What you need to do is to create a measure exactly like the Slicer_CM but for formatting.
Slicer_CM_Formatting =
VAR Mth1 =
SELECTEDVALUE ( SelMth_Current[Month] )
VAR Mth2 =
SELECTEDVALUE ( SelMth_Prior[Month] )
VAR Fcst1 =
SELECTEDVALUE ( SelMth4[Actual] )
VAR Fcst2 =
SELECTEDVALUE ( SelMth3[Actual] )
VAR Opt = 0
VAR MthVal =
CALCULATE (
SUM ( Profitability_Consolidation[Profit]);
Profitability_Consolidation[Period] = Fcst1;Profitability_Consolidation[Month] = Mth1
)
VAR MTDValue =
SWITCH ( TRUE();
AVERAGE ( Profitability_Consolidation[Chkfmt] ) = 1 && MthVal <0 ;"Red";
[Slicer_CM] <0; "Red"
)
RETURN
MTDValue
Now just use this measure has your formatting value, the "RED" can be change by any colour you want if you use a HEX colourings similar to this "#000000".
Hi MFelix...how do i format the values not % to 1dp. Currently 2dp.
- MFelix5 years agoSuper User
Hi Anonymous ,
Sorry I'm not understanding the question. What is the 1 / 2 dp?