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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Runningtotal by hour, line graph visual errors

Hi, I created a runningtotal measure that shows the sum of application counts for the same hour. By default with no time selected, the measure returns the total for the current hour. Heres my measure:

RT with Default =
VAR a =
SELECTEDVALUE ( FLA[Time] )

VAR b =
LOOKUPVALUE(FLA[Time], FLA[Current_Hour_Flag], 1)
RETURN
IF (
[Current Selections] = [Total Selections],
CALCULATE (
SUM ( 'FLA'[ApplicationCount] ),
FILTER ( ALL ( FLA ), FLA[Time] <= b && FLA[Date] = MAX ( FLA[Date] ) )
),
CALCULATE (
SUM ( 'FLA'[ApplicationCount] ),
FILTER ( ALL ( FLA ), FLA[Time] <= a && FLA[Date] = MAX ( FLA[Date] ) )
)
)
 
However, when placed on a line graph, the values get squared off because PowerBI wants to show every hour: 
aaronzheng_0-1640097227968.png

This gives inaccurate values to the other hours because of the horizontal lines. 
But, when I select an hour, it works properly:

aaronzheng_1-1640097315247.png

And each point is the same hour (3:00pm in this case).
How do I adjust the graph to behave this way?

Thanks, 

Aaron

2 REPLIES 2
Anonymous
Not applicable

Heres sample data: https://docs.google.com/spreadsheets/d/1Ddmx0vcP7t4J1W3l4YgnxYAlXK7ZtRDJ/edit#gid=1127929229

The expected output is the second screenshot.

parry2k
Super User
Super User

@Anonymous it will be easier if you share sample data and the expected output. Read this post to get your answer quickly.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.