Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. 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]))
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
22 | |
21 | |
20 | |
14 | |
11 |
User | Count |
---|---|
43 | |
34 | |
25 | |
23 | |
23 |