March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Register NowGet certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi everyone,
I have some data as represented in the dummy table below;
sales rep | sku | Qty | price | Date |
James | sku1 | 3 | 20 | 7/28/2021 |
James | sku1 | 2 | 20 | 7/29/2021 |
Peter | sku2 | 5 | 15 | 7/30/2021 |
Peter | sku1 | 4 | 20 | 7/30/2021 |
Ken | sku3 | 3 | 30 | 8/1/2021 |
Ken | sku2 | 5 | 15 | 8/2/2021 |
Ken | sku2 | 3 | 15 | 8/3/2021 |
My goal is to calculate the sum of days worked for the three sales reps i.e James worked for 2 days, Peter worked for 1 and Ken worked for 3 days. So my total days worked would be 6. Getting for an individual is easy as I just do a distinct count of date. The question is how do I get the sum for the whole team?
Any help will be highly appreciated
Solved! Go to Solution.
Hi, @Kaskazi_Network
You may try formula as below:
Measure = COUNTROWS(SUMMARIZE('Table','Table'[Date],'Table'[full_name]))
Best Regards,
Community Support Team _ Eason
Hi, @Kaskazi_Network
Could you please tell me whether your problem has been solved?
If yes, you could accept the helpful answer as solution. You could also share your own solution here.
For now, there is no content of description in the thread. If you still need help, please share more details to us.
Best Regards,
Community Support Team _ Eason
I have not found a solution as yet. Here's how my data looks like;
Full names represents the sales reps. They are multiple working on the same day but not all work on a particular day. Kindly advise if you need more details on this..
Thanks
Hi, @Kaskazi_Network
You may try formula as below:
Measure = COUNTROWS(SUMMARIZE('Table','Table'[Date],'Table'[full_name]))
Best Regards,
Community Support Team _ Eason
Hi,
The Distinctcount() function should work even for the entire team. The result of that formula should be 6.
=distinctcount(data[date])
@Kaskazi_Network
Right now each of the examples you share is on different days.
You can calculate the total days worked for the team by using a formula like this
CALCULATE (
DISTINCTCOUNT ( Table[Date] ),
ALL ( Table )
)
It will get more complicated if you have 2 Sales Reps who work on the same day.
Thank you for your response.
The formula however does not work for my dataset as I have multiple sales reps working on the same day.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
Check out the November 2024 Power BI update to learn about new features.
User | Count |
---|---|
118 | |
96 | |
87 | |
71 | |
62 |
User | Count |
---|---|
138 | |
115 | |
115 | |
99 | |
98 |