Forum Discussion
Anonymous
3 years agoNot applicable
Wrong output with specific filter
Hi everyone, I'm rather new to Power BI and I just came across a weird error. When I filter a Card visual that sums up a number of times an event has happened, it always shows the correct value ...
- 3 years ago
Anonymous I'm really confused. If you don't want to count those blank rows then you can do absolutely nothing. If you want to count those blank rows, then:
CALCULATE(COUNTA(Addresses[Date of Appointment]), USERELATIONSHIP(Addresses[Date of Appointment], 'Date'[Date])) + CALCULATE(COUNTBLANK(Addresses[Date of Appointment]), USERELATIONSHIP(Addresses[Date of Appointment], 'Date'[Date]))or:
CALCULATE(COUNTROWS(Addresses), USERELATIONSHIP(Addresses[Date of Appointment], 'Date'[Date]))
Greg_Deckler
3 years agoCommunity Champion
Anonymous What is your measure formula or are you using a simple count aggregation or ?
Anonymous
3 years agoNot applicable
CALCULATE(COUNTA(Addresses[Date of Appointment]), USERELATIONSHIP(Addresses[Date of Appointment], 'Date'[Date]))
- Greg_Deckler3 years agoCommunity Champion
Anonymous Any chance the Date of Appointment in Addresses for one row happens to be blank? COUNTA doesn't count blanks and that row might also get filtered via the relationship.
- Anonymous3 years agoNot applicable
Unfortunately I can not look into the dataset at the moment. But If that was the case, can I rewrite the measure in any way so it ignores blank rows?
I've tried this and it doesn't solve the issue:
CALCULATE(count(Addresses[Date of Appointment]), NOT(ISBLANK(Addresses[Date of Appointment])), USERELATIONSHIP(Addresses[Date of Appointment], 'Date'[Date]))- Greg_Deckler3 years agoCommunity Champion
Anonymous Well, the measure is already ignoring blank rows. COUNTA doesn't count blanks.