Forum Discussion
SuperSayan
8 years agoResolver I
Count rows depending on a condition
Hello everyone, I have an issue that I can't figure out. I'm trying to count the numbers of lines in a table where there is no date (actually value is 0 so the date is 01/01/1900) and then I'...
- 8 years ago
Hi v-yulgu-msft and Greg_Deckler
I really have to apologies to both of you!
I just realized where this issue comes from... I had put a filter on the whole report that was filtering all lines with dates <2000 (therefore including the 1900) which resulted in not showing anything in my measure.
I removed the the filter and now it works.
I feel a bit stupid after that....
Thanks again for taking the time to help on a "non existing" issue!
Greg_Deckler
8 years agoCommunity Champion
Hmm, I was able to get COUNTROWS to work in that manner using a FILTER function to return a table. Not sure what is going wrong on your end. That being said, you could also do it this way:
RestantaFaire = VAR Restant = FILTER(HistoriqueInter;HistoriqueInter[FinréelleDateH].[Année]=1900) RETURN COUNTROWS(Restant)