Forum Discussion

Hiliasse's avatar
Hiliasse
Frequent Visitor
6 years ago

Measure not working anymore with filter

Hi Everyone,

 

I looked for the solution in other topics but I did not find one which fit my case.

 

I have one fact table from a timesheet application, and 2 other Dim tables for Date and Employees.

I have added 3 measures as per below :

TOTAL NB OF HOURS = SUM(TimesheetEntries[NumberofHours])
Weekly Total = SUMX(VALUES(Dim_Date[Week]),[TOTAL NB OF HOURS])
User Weekly Total = SUMX(VALUES(Dim_User[User]),[Weekly Total])
 
The User Weekly Total measure gives me the total working hour per week per user.
 
Until here, everything is working fine and gives me the right results.
 
Things get more complicated when I try to filter :
I filter all pages for one particular department (Department coming from the Dim User table), and then things get wrong. I got the right peoples, but everyone has the same total (looking like to be the sum of all weekly working hour of each user belonging to the dept).
 
I need the total weekly working hour per dept, and I need to filter it by dept.
 
Anyone can help ?
 
Thank you a lot !

3 Replies

  • Hiliasse , I doubt it has to do with join with Employee table. Check is it an inactive join(Dotted line) or join not there

    • parry2k's avatar
      parry2k
      Icon for Super User rankSuper User

      Hiliasse you should use TOTAL NB OF HOURS in the User Weekly Total measure. How you are viewing the data? Can you share the screenshot?

    • Hiliasse's avatar
      Hiliasse
      Frequent Visitor

      amitchandak Everything looks fine in the relationships :

       
       
       

      parry2k, below pictures of what I see with filter (at left) and without filter (at right) : (it is dummy datas)

      Peoples are rightly filtered, but not values which looks to be the sum of all datas.