Forum Discussion

largetony1210's avatar
largetony1210
Regular Visitor
8 years ago

Calculate ignoring a filter

Hi,

 

You probably get this a lot but I'm new to PowerBI and DAX and having some issues with a CALCULATE formula.  It looks like this:

 

CALCULATE(COUNT(Data[id]), FILTER(Data, Data[Year] = YEAR([**LastWeekDate]) && Data[Quarter] = (CEILING(MONTH([**LastWeekDate])/3,1)-1) && Data[DayofQuarter] < [**CurrentDayofQtr])))

 

The formula seems to be accounting for the first two filters, but ignoring the third. completely. 

 

Any suggestions?

 

Thanks.

 

5 Replies

  • Hardik's avatar
    Hardik
    Continued Contributor

    please share the data sample for the same !

    • largetony1210's avatar
      largetony1210
      Regular Visitor

      Anonymised sample of dataset shown below.

       

      I've double checked my measures and they are fine, and have also tested the filters individually, and the problem seems to be "&& Data[DayofQuarter] < [**CurrentDayofQtr]". For some reason, this will not work in the formula. 

       

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        largetony1210,

        What is the data of [**LastWeekDate] and [**CurrentDayofQtr]? Could you please post complete columns of your table that can be copied and pasted?

        Regards,

        Lydia