Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.
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]))
Check out the May 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
17 | |
15 | |
14 | |
12 | |
11 |
User | Count |
---|---|
11 | |
10 | |
8 | |
7 | |
7 |