Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I have a problem I need to solve.
I have the follow
Day | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
Sales | 20 | 30 | 40 | 20 | 20 | 15 | 12 | 13 | 18 | 19 | 15 | 12 | 10 | 11 |
and I need to calculate the next matrix
Day | 7 | 14 |
Sales | 157 | 255 |
Where 157 is the cumulative sales of the first seven days and 255 is the sum of the days since 1 to 14 then i will need 1 to 21
I need to select the days for example if i select the day 8 then 1 to 8
Thanks for the help like always.
Below Measure can be used -
Cumulative_Sum = CALCULATE(SUM(TableName[Sales]),FILTER(ALL(TableName),TableName[DateCol] <= MAX(TableName[DateCol])))
Hi,
The problem is that I can't select the day and accumulate it. What makes me that measure is to give me the cumulative maximum of the month, but, if I select a day gives me the value of that day selected.
Thanks
With the measure, it will show the cumulative sum upto the date selected.
Sorry I dont understand clearly what you are trying achieve. Can you provide an example.
HI,
for example i want to select a day 7, 14, 21 and 30 or 31 and see a cumulative sales of a month.
I got it with this measure CALCULATE( SUM( sales ); DATESMTD( date[date] ) )
The measure you are using will work only for a month if you have dates for more than a month. The cumulative sum will start afresh as you are using MTD.
Try using the measure I gave, it should work for you.
Your measure adds a cumulative from the beginning of the data and not from what was selected.
Hi,
i try this CALCULATE( SUM(sales); DATEMTD(dim_date[Fecha]) )
Thanks for all
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
24 | |
20 | |
15 | |
13 |
User | Count |
---|---|
51 | |
46 | |
39 | |
19 | |
19 |