Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

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

 image.png

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] )
)
)

image.png

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

1 ACCEPTED SOLUTION
Anonymous
Not applicable
3 REPLIES 3
aj1973
Community Champion
Community Champion

@Anonymous 

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

aj1973_0-1629241297547.png

 

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

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.

 

 

Anonymous
Not applicable

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors