Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Count distinct values in calculated measure

Hello all,

 

I have been working on Benefits investigation data, where I need to find How many number of Investigations were put in system by

how many number of customer accounts. This should be dynamic related to date slicer applied. Output needed is shown in table 1

 

So far I was able to create a measure where it can show number of request put in by customer by using this measure

Number of requests by customer =
COUNTROWS (
FILTER (
ALLSELECTED ('Data' ),
'Data'[Customer ID] = SELECTEDVALUE ( Data[Customer ID] )
)
)

Now I am stuck as to how to count these distinct values in measure. I tried creating table but it did not work. I need the result as given in table 1. You can download my file at this link test.pbix .

Thank You

3 Replies

  • aj1973's avatar
    aj1973
    Icon for Community Champion rankCommunity Champion

    Anonymous 

    What do you mean by number of accounts? is it 668 like in the image here

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Meaning of number of accounts is, as you can see for image with date slicer there are two columns in table Customer ID and Number of requests by customer. So, as you can see Customer ID 27485,113908,114103(These are 3 accounts that have 6 requests)shows number of requests as 6

      So, now for same date slicer I want to create a table where it shows

      6 requests were given by 3 accounts individually, so it will say

      # of Requests      #of accounts

      6                           3

      5                            2

      so on and so forth for same date slicer.