Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
anjanikumar
Helper III
Helper III

Convert To DAX !!

case
when ( ?Sort Prompt? = 'By Cases' )
then ( [ALL Cases] )
when ( ?Sort Prompt? = 'By Skus')
then ( [CY SKU] )
when ( ?Sort Prompt? = 'By Active Skus')
then ( [CY Active SKU] )
else
([Active SKU Change] )

 

this cognos Statement please convert to dax.


end

1 ACCEPTED SOLUTION
PabloDeheza
Solution Sage
Solution Sage

Hi there!

use SWITCH statement like this:

SWITCH(

TRUE(),
?Sort Prompt? = "By Cases", ( [ALL Cases] ),
?Sort Prompt? = "By Skus", ( [CY SKU] ),
?Sort Prompt? = "By Active Skus", ( [CY Active SKU] ),
([Active SKU Change] )

)

Let me know if that helps!

View solution in original post

1 REPLY 1
PabloDeheza
Solution Sage
Solution Sage

Hi there!

use SWITCH statement like this:

SWITCH(

TRUE(),
?Sort Prompt? = "By Cases", ( [ALL Cases] ),
?Sort Prompt? = "By Skus", ( [CY SKU] ),
?Sort Prompt? = "By Active Skus", ( [CY Active SKU] ),
([Active SKU Change] )

)

Let me know if that helps!

Helpful resources

Announcements
FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.