Forum Discussion
Count rows depending on a condition
- 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!
I just realised something that may be the cause of this.
My table "HistoriqueInter" is not a simple table, it is a table created by appending 2 tables, the first table have the interventions of 2016 (table called "Inter 2016") and the second one the ones from 2017 (very logically called "Inter 2017").
So I did a test and if I'm using the exact same measure on a "simple" table, in this example my table "Inter 2017" then it behaves as planned.
My question is, is there a way to make it work on a table constructed by appending 2 tables or do I need to go back to the original tables (and therefore still need to duplicate my tables relationships)?
Hi SuperSayan,
Based on my test, below formula works for append table, too.
RestantaFaire = COUNTROWS(FILTER(HistoriqueInter;HistoriqueInter[FinréelleDateH].[Année]=1900))
How did you append the two tables? In my test, I appended them in Query Editor mode using the "Append queries as new" option.
Regards,
Yuliana Gu
- SuperSayan8 years agoResolver I
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!