Forum Discussion
GKR1981
5 years agoFrequent Visitor
Cumulative Sum and Row Count - generating incorrect values
Hi All, I have done searching and i've tried several different methods found all of the place, however non are able to provide what im chasing. I have the following data Loader Hour in Shift EX1 1 EX1 1 EX1 1 EX1 1 EX1 1 EX1 2 EX1 2 EX1 2 EX1 2 EX1 2 EX1 2 EX1 3 EX1 3 EX1 3 EX1 4 EX1 4 Basically what I want is a running total of the number of rows that appear for each hour. So i need to get a count of Rows, and then Sum those rows. I want to do a column chart showing the breakdown by hour between 1 & 12 vs Target, and then a cumulative total for a STD running total. I cannot for the life of me get this to calculate correctly. Any help would be appreciated.
2 Replies
- amitchandakSuper User
GKR1981 ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Usually cummulative
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected('date'),'date'[date] <=max('date'[date])))
or
Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(allselected('date'),'date'[date] =max('date'[date]) && 'date'[Hour] =max('date'[Hour]) ))
- V-lianl-msftCommunity Support
Hi GKR1981 ,
Refer to this blog to get quick answers to your questions:
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Refer to this blog for how to provide your sample data:
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.