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
Celador
Frequent Visitor

DAX Measure: Distinct Sum based on two other columns

 

Snippet of data is shown below - As you can see, for each Employee and Period, the Entitlement is repeated on every row.

I'm essentially after a measure that produces the Entitlement for each Employee / Period.

Each row represents an actual holiday taken, so it would contain other columns like 'hours taken', 'holiday date' - so i can't reformat the data to remove the duplication, I need a measure that calculates the right value.

 

Emp_IDEntitlementPeriodStart
12345678187.501/11/2007
12345678187.501/11/2007
9876543220001/11/2007
9876543220001/11/2007
12345678187.501/11/2008
12345678187.501/11/2008
12345678187.501/11/2008
9876543220501/11/2008
9876543220501/11/2008
1234567825501/11/2009
1234567825501/11/2009
1234567825501/11/2009
1234567825501/11/2009
9876543224001/11/2009
9876543224001/11/2009
9876543224001/11/2009
9876543224001/11/2009

 

For example, if in Power BI I threw Emp_Id, PeriodStart and my new measure into a table, it would look like this:

 

Emp_IDEntitlementPeriodStart
12345678187.501/11/2007
9876543220001/11/2007
12345678187.501/11/2008
9876543220501/11/2008
1234567825501/11/2009
9876543224001/11/2009
2 REPLIES 2
v-xjiin-msft
Solution Sage
Solution Sage

Hi @Celador,

 

To achieve your requirement, I think you can try to create a new calculated table with SUMMARIZE() function:

 

New Table =
SUMMARIZE (
    Duplicates,
    Duplicates[Emp_ID],
    Duplicates[Entitlement],
    Duplicates[PeriodStart]
)

 

11.PNG22.PNG

 

Thanks,
Xi Jin.

Zubair_Muhammad
Community Champion
Community Champion

Hi @Celador

 

Can you simply not take the MIN or MAX or Average of Entitlement Column?

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