Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hello everyone,
I want to calculate the total quantity between two dates, the problem is that all of the time I get only the sum of the current day shown in the column
CALCULATE(SUM(Sales[Quantity(KG)]), DATESBETWEEN('Sales'[Date], MINX(ALL('Date'[Date]), 'Date'[Date]), MAX(Sales[Date])))
I want to show this value in a matrix form where as rows I have products, and the columns are dates, for example
the data in the source file would be
Product quantity | 20.09.2023 | 21.09.2023 | 22.09.2023 |
A | 120 | 50 | 110 |
Product | 20.09.2023 | 21.09.2023 | 22.09.2023 |
A | 120 | 170 | 280 |
Thank you in advance.
Kind regards,
Stefani
Solved! Go to Solution.
The problem was solved only by using
CALCULATE(SUM(Sales[Quantity(KG)]), 'Date'[Date] <= MAX(Sales[Date]))
The problem was solved only by using
CALCULATE(SUM(Sales[Quantity(KG)]), 'Date'[Date] <= MAX(Sales[Date]))
User | Count |
---|---|
20 | |
17 | |
15 | |
11 | |
7 |
User | Count |
---|---|
27 | |
27 | |
13 | |
12 | |
12 |