Forum Discussion
Measure with IF statement causes cross join
Hi Anonymous ,
Any updates?
How to Get Your Question Answered Quickly - Microsoft Power BI Community
How to provide sample data in the Power BI Forum - Microsoft Power BI Community
Best Regards,
Eyelyn Qin
- Anonymous4 years agoNot applicable
Hi Evelyn,
Not yet. I've temporarily tried to create a calculated columns in my SQL statement but I really do not want to continue on that path.
I think the model design might cause the issue.
I have 3 tables.
DimDate
Fact_aggregated
Fact_detail
Relationships: DimDate to Fact_detail (1 to many)
Fact_aggregated to Fact_detail (1 to many) (key is reference_no)
The amount columns used to calculate my measures comes from Fact_aggregated. Due to complexity of business rules and granularity issue, I couldn't juste summarize with everything in the Fact_detail. I had to have a separate Fact_aggregated.So in a nutshell. I have 1 table visual with items coming from all 3 tables. If I only used the amount columns from the Fact_Aggregated, I do not get cartesian product which is the correct result. However, if I create a simple measure based on any of the same amount columns, I get a cartesian product.
SpartaBI Yes, I'm available to demo the issue live. Could you please let me know how to proceed? Thank you.
- Anonymous4 years agoNot applicable
I also forgot to mention that I had to enable BI-Directional cross filtering in all the relationships otherwise I would get cartesian product (even before adding a measure to the visual).