Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi guys,
Maybe someone could help me with this issue..
I've made a connection with MYSQL db in Power BI. The db rows are based on daily base. So I've already created a countrows measure to count the rows per day. But now I'm looking for a cumulative measure of the rows per day.
So the rows per day can be counted in a cumulative way.
Please follow the solution provided by jPinhao, you should only need to do small change to formula if you want to get the cumulative rows – replace [number] with your countrows measure.
cumulative = CALCULATE ( [countrows], FILTER ( ALLSELECTED ( Table1 ), Table1[Date] <= MAX ( Table1[Date] ) ) )
Best Regards,
Herbert
HI Everyone...
I create my DAX to accumulativer count using all your suggest, BUT, I need to know, what to modify if I apply a slicer to see accumulative by month or year. Beacuse if I apply a slicer the running total dont start correctly, just work without any slicer apply.
You have to calculate the sum of the value while filtering by all dates before the current MAX - current as in the current context, which will be the the day in a bar chart with a date on the axis for instance:
Cummulative = CALCULATE ( [number] FILTER ( ALL([Date]), [Date] <= MAX([Date]) ) )
User | Count |
---|---|
103 | |
88 | |
78 | |
71 | |
69 |
User | Count |
---|---|
113 | |
99 | |
97 | |
72 | |
68 |