Forum Discussion
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,
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,
3 Replies
- v-piga-msft
Resident Rockstar
- v-piga-msft
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
- Sadapa07Frequent Visitor
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,