Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

Double Filter

Hello everybody! I hope you all are very good!!!

 

I have a Table with data, and I want to show in the report how many of then suffer fron CONGESTION in their communications. The requirements is that it only shows the number when congestion has happened more thay five times:

By now, this is working good. But now they tell me they want to know how many Users have such occurrence more than 5 times.. I have developed a measure:

Users CONGESTION =
CALCULATE(
    DISTINCTCOUNT('GCC_COSTS AUTO_COST_OUTPUT'[User]),
        FILTER('GCC_COSTS AUTO_COST_OUTPUT',[remote_action_get_wi_fi_signal_strength_execution_outputs_AdjacentChannelsCongestion]=1)
        )
 
And the result is:

 


 

Which numbers are correct when I have in mind all the occurrences. BUT, the Card does not allow me to make the same filter:

So I got 79 users instead of two Users, which is an error. How can I also filter this second card to make it a ppear Users = 2?

 

Thanks a lot! Best regards,

 

Cheema Ortega

 

 

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Anonymous ,

    I created a sample pbix file(see the attachment), please check if that is what you want.

    Users CONGESTION = 
    VAR _tab =
        SUMMARIZE (
            'GCC_COSTS AUTO_COST_OUTPUT',
            'GCC_COSTS AUTO_COST_OUTPUT'[User],
            "@CONGESTION", CALCULATE ( SUM ( 'GCC_COSTS AUTO_COST_OUTPUT'[CONGESTION] ) )
        )
    RETURN
        COUNTROWS ( FILTER ( _tab, [@CONGESTION] > 5 ) )

    Best Regards

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    I created a sample pbix file(see the attachment), please check if that is what you want.

    Users CONGESTION = 
    VAR _tab =
        SUMMARIZE (
            'GCC_COSTS AUTO_COST_OUTPUT',
            'GCC_COSTS AUTO_COST_OUTPUT'[User],
            "@CONGESTION", CALCULATE ( SUM ( 'GCC_COSTS AUTO_COST_OUTPUT'[CONGESTION] ) )
        )
    RETURN
        COUNTROWS ( FILTER ( _tab, [@CONGESTION] > 5 ) )

    Best Regards

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi v-yiruan-msft,

       

      Thanks a lot! I think you've worked it out. SOOO MUCH APPRECIATED!!!!

       

      Chema

       

      Thanks a lot. Best regards!

       

      Chema Ortega