Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Experts, please help me to fix the below DAX.
Solved! Go to Solution.
Hi @BalaKiranM ,
1.Assume the Type columm is Number type, please try:
Type Description =
SWITCH (
TRUE (),
'Accrual View'[Type] = 11, "Carry Forward",
'Accrual View'[Type] = 2, "Earned",
'Accrual View'[Type] = 1, "Sick",
CONVERT( 'Accrual View'[Type],STRING)
)
2. Text type:
Description =
SWITCH ( [Type], "1", "Sick", "2", "Earned", "11", "Carry Forward", [Type] )
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @BalaKiranM ,
1.Assume the Type columm is Number type, please try:
Type Description =
SWITCH (
TRUE (),
'Accrual View'[Type] = 11, "Carry Forward",
'Accrual View'[Type] = 2, "Earned",
'Accrual View'[Type] = 1, "Sick",
CONVERT( 'Accrual View'[Type],STRING)
)
2. Text type:
Description =
SWITCH ( [Type], "1", "Sick", "2", "Earned", "11", "Carry Forward", [Type] )
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
If you are trying to create a new column, please try something like below.
Type Description =
SWITCH (
TRUE (),
'Accrual View'[Type] = 11, "Carry Forward",
'Accrual View'[Type] = 2, "Earned",
'Accrual View'[Type] = 1, "Sick",
'Accrual View'[Type]
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
It was Number, I changed to text.
the code compares it with number, so it needs to be numbers.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
41 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
43 | |
36 | |
33 | |
18 | |
18 |