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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Shaun_Fourie
Frequent Visitor

Table Report Measure Issue

Hi! So I have two tables in my Power BI report, see below tables. (Below are snippets from Excel, as I do not want to share the actual table data from Power Bi).

 

Tasks Table

The below table houses all the Tasks with unique Task Ids, Task Type, Customer and Summary.

Shaun_Fourie_0-1739184712158.png

Time Logs Table
The below table houses all the time logs for each task with unique Log Ids, Task Id, Time Logged in hours.

Shaun_Fourie_4-1739187344505.png

 

What I would like to do is: 

1. Sum up the total time logged and time logged per customer - Done ✔️

2. Calculate the % distribution of time logged per customer - Done ✔️

3. Calculate the total time logged for ongoing tasks - Done ✔️

4. For each customer, calculate the total time logged for customer (excluding ongoing task time logged) + (% distribution * total time logged for ongoing tasks), irrespective that ongoing tasks are allocated to the Blue customer. - Issue

 

My desired output would be a table report called Final Time Logged, Final Time Logged = total time logged for customer (excluding ongoing task time) + (% distribution * total time logged for ongoing tasks)

Shaun_Fourie_3-1739187163709.png

 

I am having an issue with point 4. I can easily do it through excel (above example) but through Power BI my measure is not allowing me to apply the time spent on ongoing tasks to all customers, as the task has the Blue customer allocated to it. I am unsure how to resolve this. Any suggestions?

1 ACCEPTED SOLUTION
bhanu_gautam
Super User
Super User

@Shaun_Fourie , Try using this measure

 

DAX
TotalTimeLoggedExcludingOngoing =
CALCULATE(
SUM('Time Logs Table'[Time Logged]),
'Tasks Table'[Task Type] <> "Ongoing"
)

TotalTimeLoggedOngoing =
CALCULATE(
SUM('Time Logs Table'[Time Logged]),
'Tasks Table'[Task Type] = "Ongoing"
)

PercentageDistribution =
DIVIDE(
SUM('Time Logs Table'[Time Logged]),
CALCULATE(SUM('Time Logs Table'[Time Logged]), ALL('Tasks Table'))
)

DistributedOngoingTime =
[PercentageDistribution] * [TotalTimeLoggedOngoing]

FinalTimeLogged =
[TotalTimeLoggedExcludingOngoing] + [DistributedOngoingTime]




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






View solution in original post

4 REPLIES 4
anmolmalviya05
Super User
Super User

Hi @Shaun_Fourie , Please try the below measure:

FinalTimeLogged =
VAR TotalTimeExcludingOngoing =
CALCULATE(
SUM('Time Logs Table'[Time Logged]),
'Tasks Table'[Task Type] <> "Ongoing"
)

VAR TotalTimeOngoing =
CALCULATE(
SUM('Time Logs Table'[Time Logged]),
'Tasks Table'[Task Type] = "Ongoing"
)

VAR PercentageDistribution =
DIVIDE(
SUM('Time Logs Table'[Time Logged]),
CALCULATE(SUM('Time Logs Table'[Time Logged]), ALL('Tasks Table'))
)

VAR DistributedOngoingTime =
PercentageDistribution * TotalTimeOngoing

RETURN
TotalTimeExcludingOngoing + DistributedOngoingTime


If this post helps to answer your question, please consider accepting it as a solution so others can find it more quickly when they face a similar challenge.


Proud to be a Microsoft Fabric community super user


Let's Connect on LinkedIn


Subscribe to my YouTube channel for Microsoft Fabric and Power BI updates.

Hi @anmolmalviya05 ! Thank you for the timely response.

 

I have replicated your suggestion and have applied it to my report, but I am still unable to allocate the time to the other customers. Please see snippet below of my actual Power Bi table report, where customer Blue = BancX.

Notice that the FinalLoggedTime is the same as the TotalTimeLoggedExcludingOngoing for the other customers, when it should have increased like it did for BancX.

Shaun_Fourie_1-1739269468390.png

 

bhanu_gautam
Super User
Super User

@Shaun_Fourie , Try using this measure

 

DAX
TotalTimeLoggedExcludingOngoing =
CALCULATE(
SUM('Time Logs Table'[Time Logged]),
'Tasks Table'[Task Type] <> "Ongoing"
)

TotalTimeLoggedOngoing =
CALCULATE(
SUM('Time Logs Table'[Time Logged]),
'Tasks Table'[Task Type] = "Ongoing"
)

PercentageDistribution =
DIVIDE(
SUM('Time Logs Table'[Time Logged]),
CALCULATE(SUM('Time Logs Table'[Time Logged]), ALL('Tasks Table'))
)

DistributedOngoingTime =
[PercentageDistribution] * [TotalTimeLoggedOngoing]

FinalTimeLogged =
[TotalTimeLoggedExcludingOngoing] + [DistributedOngoingTime]




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Hi @bhanu_gautam! Thank you for the timely response.

 

I have replicated your suggestion and have applied it to my report, but I am still unable to allocate the time to the other customers. Please see snippet below of my actual Power Bi table report, where customer Blue = BancX. Notice that the FinalLoggedTime is the same as the TotalTimeLoggedExcludingOngoing for the other customers, when it should have increased like it did for BancX.

Shaun_Fourie_0-1739269384134.png

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.