-1

I am currently trying to make a running total for a cumulative plot of some temprature data in Power BI Desktop, but cannot get it to work.

I can see from similar posts on forums that im not the only one. My problem is that I have temperature data from a large table (20-30 degrees) and then made a measure that count the instances of each specific temperature and returns the percentage of the total instances. I want to make a running total which enables me to plot the cumulative distribution.

I have tried ranking the tempertures, and ranking by dates does not make sense. I feel like it is a pretty simple problem but i have not spend 3 days without luck.

I have added some screenshots of my data and progress so far and the code i use to calculate the percentage of the cumulative total, which is the one i want made into a running total.

Hope some of you can help me with some guidance or examples of how to tackle this issue.

Sincerly Lasse

Philipp Johannis
  • 2,718
  • 1
  • 15
  • 18

1 Answers1

0

Here you can find a good example of running Total https://www.daxpatterns.com/cumulative-total-excel-2013/

Cumulative Quantity :=
CALCULATE (
    SUM ( Transactions[Quantity] ),
    FILTER (
        ALL ( 'Date'[Date] ),
        'Date'[Date] <= MAX ( 'Date'[Date] )
    )
)

You can also use this pattern to calculate cumulative if you don't have Date column:

[CumulatedSales] =
CALCULATE (
    SUM ( Products[ProductSales] ),
    ALL ( Products ),
    Products[ProductSales] >= EARLIER ( Products[ProductSales] )
)
msta42a
  • 3,601
  • 1
  • 4
  • 14
  • Hi msta42a Thanks for your answer! I have already tried this method, but the column I wish to sum is a measure that is calculated in the table. And there is no date in my data. – Lasse Kildemoes Oct 30 '20 at 09:00