Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Guys, I am new to power bi and in need of a urgent help please. I have work order numbers(wonum) field and woassignedflag field and a jobduration field. now I want to calculate sum(Jobduration) for each distinct wonum where woassignedflag = 1
Can anybody help me on this please, this is very urgent for me. Thanks
Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Sample/example data always makes answers more accurate. Totally guessing without it. So, a total guess would be:
Measure = CALCULATE(SUM('Table'[Jobduration]),FILTER('Table',[woassignedflag]=1))
?
Can anybody help me on this please?
http://community.powerbi.com/t5/Desktop/Running-count-unique-flag/m-p/430406#M198294
Thanks
Hi
Greg solution works perfectly and giving the expected output. Are you still looking for something?
Thanks
Raj
Hi yes it did work for the scenario I asked, Thanks a lot for Greg for that.....but I missed to tell something important. As one work order will be assigned to multiple people the job duration for that workorder will the duplicated if I do sum(jobduration). For example if we have wo 1 job duration as 5 hrs. This wo is assigned to 3 Engineers (Enigeeneer 1, Engg 2, Engg 3). Each will have 5 hrs of job duration. So if I do sum(jobduration it gives me 15 hrs instead I want it to show 5 hrs as job duration is unique to workorder.
So my plan after struggling a lot today was to create a flag for unique WO..as posted the link requesting for possible way to achieve it. Can you please help me.. So tha sample data and the output I am looking for is below, I have already got woassigned flag created at the backend. I don't have running - count, Wo Uniquie Flag, and the calculation for sum(Job duration). PLEASE HELP
Wonum | JobDuraint | woassigned flag | Engineer | Running-Count | Wo Uniquie Flag |
1234 | 5 | 1 | Sandeep | 1 | 1 |
1234 | 5 | 1 | Greg | 2 | 0 |
1234 | 5 | 1 | Raj | 3 | 0 |
1234 | 5 | 1 | Kevin | 4 | 0 |
7896 | 10 | 1 | Tom | 1 | 1 |
7896 | 10 | 1 | Sam | 2 | 0 |
7654 | 50 | 1 | Rahul | 1 | 1 |
7654 | 50 | 0 | Sandeep | 1 | 0 |
Output | |||||
Sum(Jobduration) for each distinct WO where woassigned =1 | wonum | ||||
5 | 1234 | ||||
10 | 7896 | ||||
50 | 7654 |
Hi Greg,
Thanks for your reply, I want to include distinctcount(Wonum) as well in the calculation since one workorder may be assigned to multiple people or one workorder may have different job durations. I have posted the sample data can you please check and let me know please
WoNum | JobDuration | WoAssignedFlag | Name | SUM(JobDuration) for distinctcount of Wonum where assigned flag =1 when selected Sandeep in filter | wonum | JobDuration | SUM(JobDuration) for distinctcount of Wonum where assigned flag =1 when selected Greg in filter | wonum | JobDuration | |||
1 | 30 | 0 | Sandeep | 1 | 44 | 5 | 12 | |||||
1 | 21 | 1 | Sandeep | 2 | 10 | 7 | 88 | |||||
1 | 23 | 1 | Sandeep | 4 | 34 | 1 | 78 | |||||
2 | 10 | 1 | Sandeep | 5 | 23 | |||||||
3 | 30 | 0 | Sandeep | |||||||||
4 | 34 | 1 | Sandeep | |||||||||
5 | 23 | 1 | Sandeep | |||||||||
5 | 12 | 1 | Greg | |||||||||
6 | 34 | 0 | Greg | |||||||||
1 | 78 | 1 | Greg | |||||||||
7 | 12 | 0 | Greg | |||||||||
7 | 34 | 1 | Greg | |||||||||
7 | 54 | 1 | Greg |
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
72 | |
70 | |
37 | |
29 | |
26 |
User | Count |
---|---|
91 | |
49 | |
45 | |
38 | |
37 |