Forum Discussion

SanjaydeAsra's avatar
SanjaydeAsra
Frequent Visitor
5 years ago

I have matrix visualization. I am using dax which provides count of emails but total do not match

Hi There, 

 

I have report as below: 

 

 

 

The DAX used for gettting values is 

3 Service = SUMX( VALUES(factServices[EmailAddress]), IF([Services 1 plus RT] > 2, 1)) 

 

This is becuase the same user has availed services twice. I want to get the total as 2 which is coming as 1. What I need to do? 

 

 

 

 

3 Replies

    • SanjaydeAsra's avatar
      SanjaydeAsra
      Frequent Visitor

      HI Xiaoxin, 

       

      Thank you for your reply. Shared article is superb! 

       

      My problem details are as below: 

      I have users of my website, there are facilitators who are trying to help users to avail the resources on website. 

       

      Resources details are as below:

       

      User  Month   Facilitator         Resource name 

      U1          Jan                             R1

      U2          Feb      F1                   R2

      U2          Mar     F1                   R3

      U4          Feb      F2                    R2

      U4          Mar      F2                    R6

      U4          Mar      F2                    R8

      U5           Feb     F3                    R1

      U5           Feb     F3                    R2

      U5           Mar    F3                    R4

      U5           Apr    F3                    R6

       

      I want an output as

       

      Facilitator F1           Feb      Mar    APR             Tot

                   First                 1                                   1

                   Second                      1                         1

          Three or more

      Facilitator F2

                    First                 1                                   1               

                   Second                        1                       1

         Three or more                       1                       1

      Facilitator F3

                    First                 1                                  1               

                   Second             1                                  1

                 Three or more                         1             1        2 (Here I am getting 1 ) 

       

      The reason is user is same . If the user ID is different, this issue does not arise. 

       

      I hope this helps you to analyze and propose a solution. 

       

      - Sanjay 

      • Anonymous's avatar
        Anonymous
        Not applicable

        HI SanjaydeAsra,

        I'd like to suggest you add a group index in the query editor, then you can create a calculated column to setting levels based on index values.

        Numbering Grouped Data in Power Query • My Online Training Hub

        After these steps, you can use Facilitator, and above custom field as row, month as the column, row table value fields as value to achieve your requirement.

        Regards,

        Xiaoxin Sheng