Forum Discussion
Anonymous
7 years agoNot applicable
dynamic conditinal formatting based on mtrix condition
Hi there, When you have a martix with Actuals and Budget columns the precentages and color coding make sense when the matrix colapsed but when you expand the matrix it dosen't make sense to have col...
- Anonymous7 years ago
Hi there,
This one works and I did conditional formatting based on that
Formatting =VAR Percentage = [Actual Vs Budget]VAR CheckExpand = Not(HASONEVALUE(GLedger[Month Name])) ||Not(HASONEVALUE(GLedger[GL_ACCT_TYPE])) || NOT(HASONEVALUE(GLedger[DD]))RETURNIf(CheckExpand = TRUE(),Percentage,0)ThanksOded Dror - 7 years ago
Hi Anonymous ,
Glad I could give some pointers to get the solution don't forget to mark your result as the answer for this post to help others.
Regards,
MFelix
Anonymous
7 years agoNot applicable
Hi there,
this is my calculation - no error there but when I put this measure in my marrix I'm getting this error (see below)
Formatting =
VAR Percentage =
Divide(((Sum('ActualVsBudget'[Activity_YTD]) - Sum(ActualVsBudget[BUD_YTD]))) , Sum(ActualVsBudget[BUD_YTD]) )
VAR CheckExpand =
NOT ( HASONEVALUE ( 'GLedger'[Account]) )
RETURN
SWITCH (
TRUE(),
CheckExpand
&& Percentage < 0,0.1, "Yellow",
CheckExpand
&& Percentage > 0,0.1, "Red"
)
VAR Percentage =
Divide(((Sum('ActualVsBudget'[Activity_YTD]) - Sum(ActualVsBudget[BUD_YTD]))) , Sum(ActualVsBudget[BUD_YTD]) )
VAR CheckExpand =
NOT ( HASONEVALUE ( 'GLedger'[Account]) )
RETURN
SWITCH (
TRUE(),
CheckExpand
&& Percentage < 0,0.1, "Yellow",
CheckExpand
&& Percentage > 0,0.1, "Red"
)
Error Message:
MdxScript(Model) (34, 31) Calculation error in measure 'GLedger'[Formatting]:
Function 'SWITCH' does not support comparing values of type True/False with values of type Number.
Consider using the VALUE or FORMAT function to convert one of the values.
Thanks,
Oded Dror
Anonymous
7 years agoNot applicable
Hi there,
I modify the measure and got it to work but it still showing flags when th ematrix is expandad
Formatting =
VAR Percentage = [Actual Vs Budget]
VAR CheckExpand =
NOT ( HASONEVALUE ( 'GLedger'[DD]) )
RETURN
SWITCH (
TRUE(),
CheckExpand
&& Percentage >= 0.0 && Percentage <= 0.10, UNICHAR(128077),
CheckExpand
&& Percentage > 0.10 && Percentage < 1.0, UNICHAR(128681)
)
Thanks,
Oded Dror