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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Sadapa07
Frequent Visitor

Multiple Case When statement in DAX from OBIEE

Hi EveryOne,

 

I have a Product table and FactTable and my code looks like this, I am trying to replicate this below OBIEE multiple case statements in Power BI using DAX

 

CASE WHEN
(
SUM

(CASE WHEN
"FactTable"."Renewal" = 'Y' THEN 1 ELSE 0 END by "Product"."Billing_ID")
)=0 THEN 'N' ELSE 'Y' END

Here I am trying to sum in fact table based on Product table Billing ID column.

 

 

Can some one help me on this?

 

Thanks,

@Sadapa07 

1 ACCEPTED SOLUTION

Hi @v-piga-msft ,

 

Thanks for the information, yes I created a measure, 

 

IF (
CALCULATE (
DISTINCTCOUNT ( FactTable[Billing_ID] ),
FILTER ( FactTable, FactTable[Renewal] = "Y" ),
ALLEXCEPT (
Product,
Product[Billing_ID]
)
) = 0,
"Y",
"N"
)

 

This works for my requirement.

 

Thanks,

@Sadapa07 

View solution in original post

3 REPLIES 3
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Sadapa07 ,

Have you solved your problem?

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

If you still need help, please share some data sample and your desired output.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-piga-msft ,

 

Thanks for the information, yes I created a measure, 

 

IF (
CALCULATE (
DISTINCTCOUNT ( FactTable[Billing_ID] ),
FILTER ( FactTable, FactTable[Renewal] = "Y" ),
ALLEXCEPT (
Product,
Product[Billing_ID]
)
) = 0,
"Y",
"N"
)

 

This works for my requirement.

 

Thanks,

@Sadapa07 

v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Sadapa07 ,

For your requirement, you could try SWITCH fucntion or IF function with dax expression in power bi.

Please refer to this similar thread firstly.

If you still need help, please share your data sample and your desired output so that we could help further on it.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors