Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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 September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
25 | |
20 | |
18 | |
17 | |
17 |
User | Count |
---|---|
34 | |
21 | |
19 | |
18 | |
10 |