Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

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 expect for when I date slice August and a specific name. Every ouput is correct no matter what I filter for, only for this specific month in combination with a specific name, the output shows 8 when it should say 9 (i checked in the dataset and the event happend 9 times in that month with that name)

 

Thanks a lot!

  • 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]))

     

7 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Anonymous What is your measure formula or are you using a simple count aggregation or ?

    • Anonymous's avatar
      Anonymous
      Not applicable
      CALCULATE(COUNTA(Addresses[Date of Appointment]), USERELATIONSHIP(Addresses[Date of Appointment], 'Date'[Date]))
      • Greg_Deckler's avatar
        Greg_Deckler
        Community 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.