Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Problem with distinct values

Hello good morning I have a problem to solve the following question, I have a table of customers that I would like to take only the different ones and break them by week and month, only when I get the different ones of the week it is ok, but when I take the month and I try to filter if two month, it returns me the difference of two accumulated months, and I want to add the two months as: 1 month equal 100 distinct, 2 months equal100 distinct, 1 plus 2 equal 200, only he brings 1 plus 2 equal 100 because they are the same customers.

 

sorry for my english

  • Hi Anonymous ,

     

    If I understood you correctly you have something like this:

     

     

    And would like this instead:

     

    If so adapt in the formula below the name of your 'Date table'[Month name column]:

     

     

    # Customers =
    SUMX (
        VALUES ( 'Date'[Month Name] ),
        CALCULATE ( DISTINCTCOUNT ( F_Pedido_Item_SC6010[C6_CLI] ) )
    )
    

     

     

5 Replies

  • Hi Anonymous ,

     

    If I understood you correctly you have something like this:

     

     

    And would like this instead:

     

    If so adapt in the formula below the name of your 'Date table'[Month name column]:

     

     

    # Customers =
    SUMX (
        VALUES ( 'Date'[Month Name] ),
        CALCULATE ( DISTINCTCOUNT ( F_Pedido_Item_SC6010[C6_CLI] ) )
    )
    

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      thank you! it's work 🙂 

       

  • Hi Anonymous,

     

    How does your visualization look like? Do you have a Date table? 

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      I already have a table, calendar, and I need my client table to bring the different month but when I filter through the calendar table with two selected months it will bring the sum of those months instead of the two months.

      • Anonymous's avatar
        Anonymous
        Not applicable

         

         

         

        like this, the sum is not right, but why is he giving different in the 2 months together, and I need him to add the 2 months, but without removing the different ones, you have to take the different ones from each month and add