Forum Discussion

mic_rys's avatar
mic_rys
Helper I
5 years ago
Solved

Count values different than

Hi, i need a daxhero!  I need to count Orders with a specific color and without it.   OrderID Color Product Values 111 Blue Prod1 1 111 Blue Prod2 2 111 Red Prod3 5 111 ...
  • Jihwan_Kim's avatar
    5 years ago

    Hi, mic_rys 

    Please kindly check the below.

    The sample pbix file's link is down below.

     

     

    Without Blue =
    VAR bluetable =
    SUMMARIZE (
    FILTER (
    SUMMARIZE ( 'Table', 'Table'[OrderID], 'Table'[Color] ),
    'Table'[Color] = "Blue"
    ),
    'Table'[OrderID]
    )
    VAR alltable =
    VALUES ( 'Table'[OrderID] )
    RETURN
    COUNTROWS ( EXCEPT ( alltable, bluetable ) )

     

    https://www.dropbox.com/s/jw8dfslfo4zte4j/mic%20rys.pbix?dl=0 

     

    Hi, My name is Jihwan Kim.

    If this post helps, then please consider accept it as the solution to help other members find it faster.