Forum Discussion
Filtering with RELATED fields
Hi Anonymous ,
Total Sales Filtered by Visual (Allselected) = CALCULATE([Total Sales],ALLSELECTED('Calendar'[DayNumberOfMonth]))
-----------------------------
Total Sales by day number = CALCULATE([Total Sales],'Calendar'[DayNumberOfMonth] = 15)Since as you say the tables are related, you don't actually need FILTER. The top measure filters on a visual, the bottom measure is perhaps a quicker way to get your measure done.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos 👍are nice too.
Nathaniel
- Anonymous6 years agoNot applicable
Nathaniel_C hi, thanks for the reply, apologies for taking so long to reply...
I'm not sure I've defined the problem correctly, I can't get what I wanted by the proposed solution.
Suppose that we wanted to generate a matrix that would have the total sales amount for each of the 31 days on any one month. so the table would look something like that:
1, 500$
2, 300$
3, 400$
.
.
31, 600$
where every row would be the sum of total sales generated on the Xth of any one month.
to make it event trickier, assume that there is a 3rd table that has the following rows
DayNo
5,
10
15,
20,
25,
31
and we wanted to generate a matrix that would sum the total sales whose day would be <= of any one of the values above. So the table woud look like
5, 2000$ (sales from 1st to 5th day of any one month)
10, 3000$ (sales from 6th to 10th day of any one month)
15, (etc...)
20,
25,
31
Thank you
Chronis