Forum Discussion
MoM
- 4 years ago
MoM = VAR __BASELINE_VALUE = [Last Month AVG Net] VAR __VALUE_TO_COMPARE = [Net USD AVG] VAR __CONDITION = SWITCH ( TRUE (), NOT ISBLANK ( __VALUE_TO_COMPARE ), FORMAT ( DIVIDE ( __VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE, 0 ), "0.0%" ) ) VAR __CONDITION_UNFORMATTED = SWITCH ( TRUE (), NOT ISBLANK ( __VALUE_TO_COMPARE ), DIVIDE ( __VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE, 0 ) ) RETURN SWITCH ( TRUE (), VALUE ( __CONDITION_UNFORMATTED ) >= 0, CONCATENATE ( __CONDITION, CONCATENATE ( " ", UNICHAR ( 9650 ) ) ), CONCATENATE ( __CONDITION, CONCATENATE ( " ", UNICHAR ( 128315 ) ) ) )with this measure I get the correct classification, it has to be something in your data.
Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!
You can also check out my LinkedIn!
Best regards,
Gonçalo Geraldes
Something just does not work out
In the card above it is not possible to change to percentages
That's weird
It is defined on text
And in general again the result of the positive comes in a different arrow and in black
And even the numbers are different
Anyway thanks I will try to check with my data what the problem is
netanel try this:
MoM 2 =
VAR __BASELINE_VALUE = [Last Month AVG Net]
VAR __VALUE_TO_COMPARE = [Net USD AVG]
VAR __CONDITION =
SWITCH (
TRUE (),
NOT ISBLANK ( __VALUE_TO_COMPARE ),
FORMAT (
DIVIDE ( __VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE, 0 ),
"0.00"
)
)
RETURN
SWITCH (
TRUE (),
VALUE ( __CONDITION ) > 3, CONCATENATE ( __CONDITION, CONCATENATE ( " ", UNICHAR ( 9650 ) ) ),
CONCATENATE ( __CONDITION, CONCATENATE ( " ", UNICHAR ( 128315 ) ) )
)Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!
You can also check out my LinkedIn!
Best regards,
Gonçalo Geraldes
- netanel4 years agoPost Prodigy
Still not getting the right result
I really do not understand what the problem is ...
It should be simple
I used to do something like this:
Measure = IF ([sum]> = 0, [sum] & "⇧", [sum] & "⇩")
But nothing works out for me ...This is what came out of your last formula:
- goncalogeraldes4 years agoSuper User
netanel Why dont you use conditional formating with icons then? To show as percentage do the following:
MoM = VAR __BASELINE_VALUE = [Last Month AVG Net] VAR __VALUE_TO_COMPARE = [Net USD AVG] VAR __CONDITION = SWITCH ( TRUE (), NOT ISBLANK ( __VALUE_TO_COMPARE ), FORMAT ( DIVIDE ( __VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE, 0 ), "0.0%" ) ) RETURN SWITCH ( TRUE (), VALUE ( __CONDITION ) > 0, CONCATENATE ( __CONDITION, CONCATENATE ( " ", UNICHAR ( 9650 ) ) ), CONCATENATE ( __CONDITION, CONCATENATE ( " ", UNICHAR ( 128315 ) ) ) )Hope this answer solves your problem!
If you need any additional help please @ me in your reply.
If my reply provided you with a solution, please consider marking it as a solution ✔️ or giving it a kudoe 👍
Thanks!
You can also check out my LinkedIn!
Best regards,
Gonçalo Geraldes