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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.