cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Oskar
Frequent Visitor

How to compare two sums in PowerBi? Total tasks compared to tasks marked as "done" per customer?

Hi

 

I have 1 table with tasks.

Each row is one task. each row have customername, taskname, taskstatus

 

I want to know how many tasks is there per customer and how many of these tasks are marked as "done".

then in powerbi only show customers that have all their tasks done (total tasks for customer = tasks done)

 

i have done this with dax measure and it works.

but then my filter for the whole report based on relationships are not working.

it just displays things wrong.

 

so i need to figure out another way how to count the tasks for one customer. then count the tasks that are done and only show those customers that have all their tasks done.

 

 

 

 

 

2 REPLIES 2
Anonymous
Not applicable

Hi @Oskar ,

 

Is it possible to provide some dummy data and expected results?

 

Best Regards,

ShundaSteph

amitchandak
Super User
Super User

@Oskar ,
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Ideally these two measure should help

 

Total = countrows(Task)

 

Done = Countrows(filter(Task, Task[Status] ="Done]) )

 

All task done

 

countrows(filter(summarize(Task, Customer[Customer], "_1", [Total], "_2" , [Done]) , [_1] =[_2]) )

 

Assume customer is dimension

Helpful resources

Announcements
PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Top Solution Authors