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
New_be
Helper V
Helper V

Failed to get correct total

2024-07-10_16-40-57.jpg

Hi expert,
As per subject, I failed to get a correct total headcounts as in the image. To create matrix table visual, I created a measures to calculate the headcount:
          

Headcount =
    CALCULATE(
        MIN('Leavetable'[Headcount]),
        ALLEXCEPT(Calendar, Calendar[YearMonth]),
        ALLEXCEPT(EmpProfile, EmpProfile[Department])
    )
Per department level (department coming from EmpProfile table), I got a correct value, but on the YearMonth level (coming from calendar table) to show the total from the sum of values in department level, I failed. Please show me a correct way to get the total per YearMonth in my case explained in the image attached.

1 ACCEPTED SOLUTION
New_be
Helper V
Helper V

Hi all,
Thank you for replying, at last I found the solution;
Here is the working measure:

SUMX(
    VALUES(EmployeeProfile[Department]),
    CALCULATE(
        MIN('Leave table'[Headcount])
    )
)

View solution in original post

2 REPLIES 2
New_be
Helper V
Helper V

Hi all,
Thank you for replying, at last I found the solution;
Here is the working measure:

SUMX(
    VALUES(EmployeeProfile[Department]),
    CALCULATE(
        MIN('Leave table'[Headcount])
    )
)
Uzi2019
Super User
Super User

Hi @New_be 

 

Try below measure:

SUMX(
              SUMMARIZE(‘LeaveTable’,Leavetable[yearmonth],”YM”,leavetabe[Department],MIN(‘Leavetable’[headcount])),
              [HQ]
            )


 

I hope above measure would work for u!

 

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

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