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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi
Could you please convert below two Cognos Case statements to convert to calculated column of DAX in Power BI.
Please help me asap. Thanks in Advance.
1
case
when ( [Year] ='CY' and [SKU Status]='Active' )
then
( [SKU Count] )
else ( 0 )
end
2
CASE WHEN ( [Year]='CY' )
THEN ([Invoice Cases])
ELSE (0)
END
Solved! Go to Solution.
@anjanikumar , Use Switch
Switch ( True() ,
[Year] ="CY" && [SKU Status]="Active" , [SKU Count] ,
0 )
2
Switch(True() ,
[Year]=" CY" , [Invoice Cases] ,
0 )
Switch- the Case statement of #PowerBI: https://www.youtube.com/watch?v=gelJWktlR80&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=56
Hi @anjanikumar ,
Has your problem been solved, if not, please refer to the following.
1
if( [Year] = 'CY' && [SKU Status] = 'Active', [SKU Count],0 )
2
if( [Year] ='CY' , [Invoice Cases], 0)
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@anjanikumar , Use Switch
Switch ( True() ,
[Year] ="CY" && [SKU Status]="Active" , [SKU Count] ,
0 )
2
Switch(True() ,
[Year]=" CY" , [Invoice Cases] ,
0 )
Switch- the Case statement of #PowerBI: https://www.youtube.com/watch?v=gelJWktlR80&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=56
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 |
|---|---|
| 57 | |
| 44 | |
| 41 | |
| 21 | |
| 18 |
| User | Count |
|---|---|
| 183 | |
| 114 | |
| 93 | |
| 61 | |
| 45 |