Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hello ! I have 2 different columns, Period 1, Period 2. Need a simple function to evaluate and return 3 possible answers:
1. If Period 1 > Period 2 return 1
2. If Period 1 = Period 2 return 0
3. If Period 1 < Period 2 return 2
What function do I need to use to do this 3 way evaluation?
Was looking at Switch but how do I place the Syntax?
If statement I believe won't work because it returns only 2 possibilities.
Any other function I need to take a look at?
Any thoughts Community? Much apprexiate the help im advance...
Solved! Go to Solution.
pls try this
MEASURE =
VAR _t1 = MAX('your table'[Period 1]
VAR _t2 = MAX('your table'[Period 2]
RETURN
SWITCH(
TRUE(),
_t1 > _t2 ,1,
_t1 =_t2 ,0,
_t1 < _t2 ,2
)
-------or ----
COLUMN =
VAR _t1 = 'your table'[Period 1]
VAR _t2 = 'your table'[Period 2]
RETURN
SWITCH(
TRUE(),
_t1 > _t2 ,1,
_t1 =_t2 ,0,
_t1 < _t2 ,2
)
pls try this
MEASURE =
VAR _t1 = MAX('your table'[Period 1]
VAR _t2 = MAX('your table'[Period 2]
RETURN
SWITCH(
TRUE(),
_t1 > _t2 ,1,
_t1 =_t2 ,0,
_t1 < _t2 ,2
)
-------or ----
COLUMN =
VAR _t1 = 'your table'[Period 1]
VAR _t2 = 'your table'[Period 2]
RETURN
SWITCH(
TRUE(),
_t1 > _t2 ,1,
_t1 =_t2 ,0,
_t1 < _t2 ,2
)
User | Count |
---|---|
95 | |
86 | |
78 | |
72 | |
67 |
User | Count |
---|---|
110 | |
104 | |
84 | |
65 | |
63 |