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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Nickstad
Frequent Visitor

My running total resets, i have no idea why.

Hey, 

 

I'm new to PowerBi and i just cant seem to get my line graph right. For some reason the count keeps resetting. I would really appreciate some help with this. I posted some screenshots for clarification. Thank you!

Nickstad_0-1674643565731.pngNickstad_1-1674643604616.png

Nickstad_2-1674643617780.png

Nickstad_3-1674643646946.png

 

 

 

3 REPLIES 3
Nickstad
Frequent Visitor

Thanks for the replies @Syndicate_Admin @Thomas_Daubert , im working on it. Do you guys know if this date format is allright? I just can't seem to get the calender icon that i see when i look in tutorials online. 

Nickstad_0-1674645058070.pngNickstad_1-1674645094369.png

Nickstad_2-1674645123847.png

 I got the DAX for the data from a friend.

 

 

 

Thomas_Daubert
Frequent Visitor

Hello,

YTD is year to date, so it calculate from 1 january to 31 december and reset the 31 December at midnight.

you need something like that : 

Running Total COLUMN =
CALCULATE (
    SUM ( 'All Web Site Data (2)'[UniquePageviews] ),
    ALL ( 'All Web Site Data (2)' ),
    'All Web Site Data (2)'[Date] <= EARLIER ( 'All Web Site Data (2)'[Date] )
)
Syndicate_Admin
Administrator
Administrator

It looks like the issue you're experiencing with your line chart in Power BI is related to the way the data is being aggregated.

Based on the screenshots you've provided, it seems that the data is being aggregated by the "Date" column, and the "Count" column is being used as the value. However, the count is resetting every time the date changes, resulting in a line chart that starts at 0 for each new date.

To fix this, you need to change the way the data is being aggregated. One option is to group the data by the "Date" column and then use the "SUM" aggregation for the "Count" column. This way, the count will not reset every time the date changes, and the line chart will show the correct values.

Another option is to use the "COUNTA" function instead of "COUNT" function.

You can also use the "RUNNING_SUM" function to create a cumulative sum of the count, this way the count will not reset every time the date changes

You may also want to check if you have the correct date format in your data, this can also cause the issue.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.