Forum Discussion

Peter_Jeyaraj_I's avatar
6 years ago
Solved

Ignore the filter not working

Hi, 

This looks simple and but i tried differently and nothing works for me. Here below i explained the scenario by using sample data

My input data table structure 

QuarterIn/Out FlagID

2010-1IN1
2010-2IN2
2010-3IN3
2010-4IN4
2011-1IN5
2011-2IN6
2011-3IN7
2011-4IN8
2012-1IN9
2012-2IN10
2012-3IN11
2012-4IN12
2010-2OUT13
2010-3OUT14
2011-1OUT15
2011-2OUT16
2011-3OUT17
2011-4OUT18
2012-1OUT19
2012-2OUT20
2012-3OUT21
2012-4OUT22

 

Expected output would be like quarter wise distinct ID count even if i apply a filter on the [In/out flag] column.

I am getting below output when i apply a filter [In/out flag] = "Out" ( See it's missing some quarters 2010-1 & 2010-4)

In/Out FlagOUT
  
QtrCount of Dist ID
2010-22
2010-32
2011-12
2011-22
2011-32
2011-42
2012-12
2012-22
2012-32
2012-42

but i need the below output

QtrCount of Dist ID
2010-11
2010-22
2010-32
2010-41
2011-12
2011-22
2011-32
2011-42
2012-12
2012-22
2012-32
2012-42

Now i used ALL function 
Distinct ID = CALCULATE(DISTINCTCOUNT([ID]),
ALL(
Table[In/Out Flag]
))...  but still missing some quarter figures. 

 

Regards, 

Peter I

  • Hi Peter_Jeyaraj_I ,

     

    It is caused by when you filter the "OUT", the first field quater are also filtered. We can create a spreate calculated table to meet your requirement:

     

    QuarterTable = DISTINCT('Table'[Quarter])

     

     


    BTW, pbix as attached.

     

    Best regards,

    Community Support Team _ Dong Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • v-lid-msft's avatar
    v-lid-msft
    Community Support

    Hi Peter_Jeyaraj_I ,

     

    It is caused by when you filter the "OUT", the first field quater are also filtered. We can create a spreate calculated table to meet your requirement:

     

    QuarterTable = DISTINCT('Table'[Quarter])

     

     


    BTW, pbix as attached.

     

    Best regards,

    Community Support Team _ Dong Li
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Peter_Jeyaraj_I's avatar
      Peter_Jeyaraj_I
      Helper II

      Hi v-lid-msft ,

      I tried the same las time but didn't work for some reason. Now, it's working fine. 

       

      Thanks & Regards, 

      Peter I