Aug 03 2017 11:13 AM
I have countif formula, that generates a 1 when one date is greater than another. However, in my data model pivot table it is counting all the blank values as well.
Any way around this?
Aug 03 2017 07:37 PM
Your question is not clear to me.
Can you explain or put screen shot and tell what you want.
Aug 04 2017 03:42 AM
SolutionHi,
As i understood you use formula like
=IF(date1>date2,1,"")
and count this field in pivot table. Yes, it will count everything includes "". You may apply same field as a filter to pivot table and unfilter empty values to receive correct result.
Alternatively you may use formula
=--(date1>date2)
which returns 1 or 0, apply to these cells custom format
0;0;;@
to make zeroes invisible, refresh pivot table (to shift from text field type to numeric) and use Sum instead of Count.
Something like this.
Aug 04 2017 04:03 AM
Perhaps one more option - if you add your pivot table to data model when created, you may add measure to it like
=CALCULATE(COUNTROWS(yourTable),yourFiled="1")
and use this measure in pivot table
Aug 04 2017 06:12 AM
Thanks so much ..you're a life saver :)
Aug 04 2017 03:42 AM
SolutionHi,
As i understood you use formula like
=IF(date1>date2,1,"")
and count this field in pivot table. Yes, it will count everything includes "". You may apply same field as a filter to pivot table and unfilter empty values to receive correct result.
Alternatively you may use formula
=--(date1>date2)
which returns 1 or 0, apply to these cells custom format
0;0;;@
to make zeroes invisible, refresh pivot table (to shift from text field type to numeric) and use Sum instead of Count.
Something like this.