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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Sharma0815
Helper II
Helper II

Trying to calculate productive score using three different summarized tables

Hi Everyone,

 

I have three different summarized tables in my data model which represent user incoming calls handled, outbound calls, cases closed and I have one more table which is user login hours. 

 

I am trying to calculate the Productivity score of every user by using (calls handled + outbound calls + cases closed ) / Login Hours

 

Tables incoming calls handled, outbound calls, cases closed looks like below.

 

Calls Handled

usercalls_handledUser-work-day
UTYAA1410UTYAA14-2019-10-11
UTYAA156UTYAA14-2019-10-12
UTYAA168UTYAA14-2019-10-14
UTYAA179UTYAA14-2019-10-15
UTYAA184UTYAA14-2019-10-16

 

 

Outbound Calls

 

useroutbound_callsUser-work-day
UTYAA142UTYAA14-2019-10-11
UTYAA154UTYAA14-2019-10-12
UTYAA165UTYAA14-2019-10-14
UTYAA171UTYAA14-2019-10-15
UTYAA184UTYAA14-2019-10-16



Cases_Closed

userCases_closedUser-work-day
UTYAA1420UTYAA14-2019-10-11
UTYAA1511UTYAA14-2019-10-12
UTYAA1612UTYAA14-2019-10-14
UTYAA177UTYAA14-2019-10-15
UTYAA184UTYAA14-2019-10-16

 

User login Hours

userLogin HoursUser-work-day
UTYAA128UTYAA12 - 2019-10-11
UTYAA137UTYAA13- 2019-10-12
UTYAA149UTYAA14 - 2019-10-13
UTYAA159UTYAA15 - 2019-10-14
UTYAA1610UTYAA16- 2019-10-15
UTYAA177UTYAA17 - 2019-10-16

 

I've created a relationship between user login hours to all three tables using User-work-day and I tried to create a column  (calls handled + outbound calls + cases closed ) / Login Hours, but the columns are not showing up in the calculation.

 

Any help would be appreciated  

2 ACCEPTED SOLUTIONS
CNENFRNL
Community Champion
Community Champion

Hi, @Sharma0815 , I recommend you create separate dimensional tables for dates and users; then create relationships among all tables, so that you can easily do some calculations. Here's the attached file  for more details.

Screenshot 2020-11-12 013510.png

Screenshot 2020-11-12 014747.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

wdx223_Daniel
Super User
Super User

Productivity Score :=
DIVIDE (
    CALCULATE (
        SUM ( 'Calls_Handled'[calls_handled] ),
        TREATAS ( VALUES ( User_login_Hours[user] ), Calls_Handled[user] )
    )
        + CALCULATE (
            SUM ( Outbound_Calls[outbound_calls] ),
            TREATAS ( VALUES ( User_login_Hours[user] ), Outbound_Calls[user] )
        )
        + CALCULATE (
            SUM ( Cases_Closed[Cases_closed] ),
            TREATAS ( VALUES ( User_login_Hours[user] ), Cases_Closed[user] )
        ),
    SUM ( User_login_Hours[Login Hours] )
)

View solution in original post

3 REPLIES 3
Sharma0815
Helper II
Helper II

Both  solutions are giving correct result,Thanks @wdx223_Daniel , @CNENFRNL 

wdx223_Daniel
Super User
Super User

Productivity Score :=
DIVIDE (
    CALCULATE (
        SUM ( 'Calls_Handled'[calls_handled] ),
        TREATAS ( VALUES ( User_login_Hours[user] ), Calls_Handled[user] )
    )
        + CALCULATE (
            SUM ( Outbound_Calls[outbound_calls] ),
            TREATAS ( VALUES ( User_login_Hours[user] ), Outbound_Calls[user] )
        )
        + CALCULATE (
            SUM ( Cases_Closed[Cases_closed] ),
            TREATAS ( VALUES ( User_login_Hours[user] ), Cases_Closed[user] )
        ),
    SUM ( User_login_Hours[Login Hours] )
)
CNENFRNL
Community Champion
Community Champion

Hi, @Sharma0815 , I recommend you create separate dimensional tables for dates and users; then create relationships among all tables, so that you can easily do some calculations. Here's the attached file  for more details.

Screenshot 2020-11-12 013510.png

Screenshot 2020-11-12 014747.png


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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