Forum Discussion
Marinus
Helper I
9 months agoCount blank rows if blank in 2 columns
I want to count blank rows, but only if blank in the columns
'BD Conflictenexports'[Acc.Pl.Toel.] and 'BD Conflictenexports'[Acc.Vd.Toel.].
Can you tell me the correct formula for this measure?
Download example file with this code
Try this
Count Blank Rows := COUNTROWS ( FILTER ( 'BD Conflictenexports', ISBLANK ( 'BD Conflictenexports'[Acc.Pl.Toel.] ) && ISBLANK ( 'BD Conflictenexports'[Acc.Vd.Toel.] ) ) )Regards
Phil
2 Replies
- PhilipTreacy
Super User
Download example file with this code
Try this
Count Blank Rows := COUNTROWS ( FILTER ( 'BD Conflictenexports', ISBLANK ( 'BD Conflictenexports'[Acc.Pl.Toel.] ) && ISBLANK ( 'BD Conflictenexports'[Acc.Vd.Toel.] ) ) )Regards
Phil
- Hans-Georg_Puls
Super User
Hi Marinus,
If I understand your requirement correctly, you want to count all rows where both columns are empty. The following measure should do that:
Count Empty Rows = CALCULATE(COUNTROWS('BD Conflictenexports'),'BD Conflictenexports'[Acc.Pl.Toel.] = "" && 'BD Conflictenexports'[Acc.Vd.Toel.] = "")Depending on the real content of the empty cells and if the first attempt doesn't work, you can try the following filter expression:ISBLANK('BD Conflictenexports'[Acc.Pl.Toel.]) && ISBLANK('BD Conflictenexports'[Acc.Vd.Toel.])Hope that works for you!