[ad_1]
Our typical Measures combination the Values from columns in a single Truth desk. However what is required to calculate a outcome that depends upon Knowledge in one other Truth desk? Let’s have a look at a doable answer.
What is required to calculate a outcome primarily based on a particular worth in DAX?
Easy: A filter.
However what if the filter must be a desk?
Fortuitously, I already know find out how to work with tables in DAX Measures:
And now, my shopper gave me a problem to place my data to the check:
Have a look at the next Report:
As you’ll be able to see, the variety of merchandise offered differs between On-line and Retail Gross sales.
My shopper requested the next questions:
- What’s the On-line Gross sales Quantity for the Merchandise offered in Retail Shops as properly?
- And which Merchandise are offered solely On-line?
Can I reply the primary query in Energy BI by making use of a Filter on the left desk like this?
Sadly, this doesn’t work.
The reason being that no Relationship connects these two tables, and the Filter course to Dimension tables works solely in a single course.
Sure, I may change it to bidirectional filtering. However this may introduce points because it won’t work in any state of affairs.
[ad_2]