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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

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
November Carousel

Fabric Community Update - November 2024

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

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.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.