Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

Count Rows and then sum them on a timeline

Hello guys,

 

First of all, I can't create any index coloumns because its a live connection and Im not the Admin.

 

my Problem: I want to add the sum of each day to the next day. I have the date - and for each date are a certain amount of rows, these rows (numbers of customers) I want to visual.

 

So my visual looks right now like this: 

Franz_DE_0-1629112531227.png

 

but this is the goal: 

 

Franz_DE_1-1629112657227.png

 

I do not have any index. So I did the "countrows" function. So I have for each date a certain amount of rows. This rows I want so sum up and add them to the following day, how can I do this with dax?

Thanks 🙂

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , hope you have date in date or fact tables

 

A measure like

 

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(Sales),Sales[Sales Date] <=max(Sales[Sales Date])))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , hope you have date in date or fact tables

 

A measure like

 

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(Sales),Sales[Sales Date] <=max(Sales[Sales Date])))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors