Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I want to write a measure which filters the data by multiple columns.
I want a cumulative total for a product over the course of twelve weeks and then I want to have a measure which shows the performance of an individual sales person to match against the performance of the whole team.
Week Number | Product | Value | Sales Person |
1 | Apples | £ 10 | Annie |
1 | Apples | £ 10 | Jon |
1 | Apples | £ 10 | Tom |
1 | Apples | £ 10 | Jon |
1 | Apples | £ 10 | Annie |
1 | Apples | £ 10 | Jon |
1 | Apples | £ 10 | Dave |
1 | Apples | £ 10 | Tom |
1 | Apples | £ 10 | Jon |
1 | Apples | £ 10 | Annie |
2 | Apples | £ 10 | Dave |
2 | Apples | £ 10 | Annie |
2 | Apples | £ 10 | Tom |
I use the following dax formula to get the cumulative total
= CALCULATE(SUM('table'[value]) , FILTER(ALL('table'),table[week number]<=MAX('table'[week number]), VALUE('table'[Product]))
what do I need to add to just get the cumulative sales for Dave?
Solved! Go to Solution.
Hi,
Did you try?
= CALCULATE(SUM('table'[value]) ,
FILTER(ALL('table'),
AND(table[week number]<=MAX('table'[week number]),
table[Sales Person] = "Dave"),
VALUE('table'[Product]))
Hi,
Did you try?
= CALCULATE(SUM('table'[value]) ,
FILTER(ALL('table'),
AND(table[week number]<=MAX('table'[week number]),
table[Sales Person] = "Dave"),
VALUE('table'[Product]))
That's great thanks it's worked.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |