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
Hello there netanel ! You can try this:
MoM =
VAR __BASELINE_VALUE = [Last Month AVG Net]
VAR __VALUE_TO_COMPARE = [Net USD AVG]
VAR __CONDITION =
IF (
NOT ISBLANK ( __VALUE_TO_COMPARE ),
DIVIDE ( __VALUE_TO_COMPARE - __BASELINE_VALUE, __BASELINE_VALUE )
)
RETURN
SWITCH ( TRUE (), __CONDITION > 0, UNICHAR ( 9650 ), 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
Hey goncalogeraldes
I stick to this solution
I just put card on card and that's how I got my formula that it's good and your arrow.
The problem is that sometimes even though the negative result the sign is positive
Can understand why?
- netanel4 years agoPost Prodigy
you can look on that please?
- goncalogeraldes4 years agoSuper User
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