Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Experts, please help me to fix the below DAX.
Solved! Go to Solution.
Hi @Anonymous ,
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 @Anonymous ,
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]
)
hi @Anonymous @what type of data do you have for the [type] column
It was Number, I changed to text.
the code compares it with number, so it needs to be numbers.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 18 | |
| 14 | |
| 14 |