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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
mishb77
Frequent Visitor

DISTINCT COUNT ON A MEASURE

I have the following tables.   

Participants  -  All participants provides participant detail

DateTable -  Date table. 

Revenue  - details all transactions  by transactions date made by a participant  (looks up to Participant and Date Table)

Enforcement Actions- logs by date when an  Enforcemennt activity is carried out (looks up to Participant and Date Table)

 

The following measure counts how much money has been collected within 30 days of an enforcment activity being carried out. 

 

Revenue Collections 30 Days after enfocement activity = var _min = MAXX(ALLSELECTED(DateTable),DateTable[Date]) return CALCULATE([Total Revenue Collected],FILTER(Lookup_Participants,CONTAINS(EnforcementActions,EnforcementActions[participant_ID],Lookup_Participants[Participant_ID])),DATESINPERIOD(DateTable[Date],_min,+30,DAY))

 

What I can't figure out is what calcution I need to do to get the distint participants that made payments.    I've tried using Distinct Participant from all my tables but it doesn't filter it down to take into consideration the filters in the above measure. 

 

Any suggestions?

1 REPLY 1
amitchandak
Super User
Super User

@mishb77 ,Not clear with formula . Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.