Forum Discussion
onedayover
Helper III
2 years agoReplacing blanks with previous count in continuous line chart
Hi All I'm hoping someone will be able to help me modify this measure. I've tried a number of ways to make it work but can't quite seem to get it right. Where there is a blank week (Wk 9 in this exa...
- 2 years ago
2024_cate_tickets = VAR CurrentCount = COUNTROWS ( FILTER ( ALL ( 'cate' ), 'cate'[week_num] <= MAX ( 'cate'[week_num] ) && 'cate'[date_registered] <= MAX ( 'cate'[date_registered] ) && 'cate'[event] = "cate 2024" ) ) RETURN IF( ISBLANK(CurrentCount), CALCULATE( LASTNONBLANK('cate'[week_num], CurrentCount), FILTER(ALL('cate'), 'cate'[week_num] < MAX('cate'[week_num])) ), CurrentCount )
aduguid
Memorable Member
2 years ago2024_cate_tickets =
VAR CurrentCount = COUNTROWS (
FILTER (
ALL ( 'cate' ),
'cate'[week_num] <= MAX ( 'cate'[week_num] )
&& 'cate'[date_registered] <= MAX ( 'cate'[date_registered] )
&& 'cate'[event] = "cate 2024"
)
)
RETURN
IF(
ISBLANK(CurrentCount),
CALCULATE(
LASTNONBLANK('cate'[week_num], CurrentCount),
FILTER(ALL('cate'), 'cate'[week_num] < MAX('cate'[week_num]))
),
CurrentCount
)onedayover
Helper III
2 years agoHi aduguid,
Thank you for your reply.
I just tried your code and it the graph didn't change. Do you have any further suggestions?
Thanks