Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 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]))
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
25 | |
12 | |
9 | |
9 | |
9 |
User | Count |
---|---|
21 | |
14 | |
14 | |
13 | |
13 |