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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
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