Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

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: 

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

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

Thanks, 

Aaron