Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
So I have these table relationships as below.
Basically I want to filter to show Sales per Venue but I have no way of connecting Sales table to Venue table so it has to go through the Users table. Issue is that I have to make the relationship between Users and Calls table bidirectional otherwise it would show incorrect results. But the problem is that in my real report it is not an option for me to make the relationship bidirectional as it would conflict with other tables. Is there any DAX query I can use to filter Sales per Venue?
Solved! Go to Solution.
The simplest applicaiton of expanded table,
Sales by Venue = CALCULATE(SUM(Sales[Sales]),Calls)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
The simplest applicaiton of expanded table,
Sales by Venue = CALCULATE(SUM(Sales[Sales]),Calls)
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
@Anonymous
You could also do it with a measure like this.
Sales by Venue =
CALCULATE (
SUM ( Sales[Sales] ),
CROSSFILTER ( Calls[Username], Users[Username], BOTH )
)
This measure will also work for showing amounts by name for example. It just makes the relationship between Calls and Users bi-directional when it is calculating rather than you having to set it that way in the model.
@Anonymous , Try a measure like
var _tab = summarize(allselected(Call), Call[username]) // or// summarize(filter(allselected(Call), Venue[Venue] in allselected(Venue[Venue])), Call[username])
return
calculate(sum(sales[sales]), filter(users,users[username] in _tab))
also treatas, check https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/
User | Count |
---|---|
117 | |
75 | |
61 | |
50 | |
44 |
User | Count |
---|---|
174 | |
125 | |
60 | |
60 | |
57 |