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 have Date range as a slicer
When I select date I need to show Total Sales.
Data:
Customer | Date | Sales |
A | 01-Jan | 100 |
A | 01-Feb | 200 |
A | 01-Mar | 300 |
A | 01-Apr | 400 |
B | 01-Jan | 10 |
B | 01-Feb | 20 |
B | 01-Mar | 30 |
B | 01-Apr | 40 |
If i Selected Date is between 01 Feb - 01 Apr
Required output:
Customer | Date | SalesSum |
A | 01-Feb | 900 |
A | 01-Mar | 900 |
A | 01-Apr | 900 |
B | 01-Feb | 90 |
B | 01-Mar | 90 |
B | 01-Apr | 90 |
If i Selected Date is between 01 Feb - 01 Mar
Customer | Date | SalesSum |
A | 01-Feb | 500 |
A | 01-Mar | 500 |
B | 01-Feb | 50 |
B | 01-Mar | 50 |
I tried implementing with use of ALLexcept but it is not considering date filter.
Request to please help.
Solved! Go to Solution.
@Anonymous ,
You need to create another table 'Table (2)' with one date column as below and create the slicer based on the date column in the new table:
Then create a measure using dax below:
Sales Total = CALCULATE(SUM('Table'[Sales]), FILTER(ALLEXCEPT('Table', 'Table'[Customer]), 'Table'[Date] in VALUES('Table (2)'[Date])))
You can also refer to the pbix.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous ,
You need to create another table 'Table (2)' with one date column as below and create the slicer based on the date column in the new table:
Then create a measure using dax below:
Sales Total = CALCULATE(SUM('Table'[Sales]), FILTER(ALLEXCEPT('Table', 'Table'[Customer]), 'Table'[Date] in VALUES('Table (2)'[Date])))
You can also refer to the pbix.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you very much! It worked as expected 🙂
You ALLEXCEPT should look like ALLEXCEPT('Table','Table'[Customer]), does it?
Thanks for reply Greg.
I am using
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 |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |