Forum Discussion
Dax start at first non blank value
- 7 years ago
Hi Anonymous
You could check whether the cumulative sum so far is zero, and in that case return blank. Something like
Measure = IF ( [CumulativeSum] <> 0, [YourMeasure] )
Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers

- 7 years ago
Hi Anonymous,
One sample for your reference, please check the following steps as below.
1. Insert an index column in power query.
2. To create two calcualted columns.
Countrows = CALCULATE(COUNTROWS('Table'),FILTER('Table','Table'[value]=0 && 'Table'[year]<=EARLIER('Table'[year])))Tags = VAR ind = 'Table'[Index] + 1 VAR ca = CALCULATE ( MAX ( 'Table'[Countrows] ), FILTER ( 'Table', 'Table'[Index] = ind ) ) var indmin = CALCULATE(MIN('Table'[Index]),FILTER('Table','Table'[value]<>0))-1 RETURN IF ( 'Table'[value] = 0 && 'Table'[Countrows] <> ca || 'Table'[Index]=indmin, "ignore", "count" )3. Then we can get the excepted reulst by filtering the Tags column.
For more details, please check the pbix as attached.
Hi Anonymous
You could check whether the cumulative sum so far is zero, and in that case return blank. Something like
Measure = IF ( [CumulativeSum] <> 0, [YourMeasure] )
Please mark the question solved when done and consider giving kudos if posts are helpful.
Cheers ![]()
- jessicamewald5 years agoNew Member
As simple as this is, I was struggling with this for 3 days, then I came upon this post and it was exactly what I needed. Thank you!!!!!