Reply
BarryFletcher
Helper III
Helper III
Partially syndicated - Outbound

Count Unique Rows

Trying again with this one - my rushed typing wasn't clear the first time - apologies.

 

I have a list of timesheets whish are entered weekly, as can be seen on the image below, each entryin each timesheet is listed, showing 5 items. what i would like to do is just count the number of timesheets submitted and nt each entry - so 3 timesheets entered.

 

So for "Liz" can I get a record / count to say one entry and use that as a timesheet submitted "count".

So week 45, Liz submitted 1 timsheet and the fact the there are 2 entries on that timesheet is irrelevant to me.

 

The overall result for week 45 is that 3 timesheets were submitted.

Screenshot 2024-12-16 144503.jpg

1 ACCEPTED SOLUTION
v-tangjie-msft
Community Support
Community Support

Syndicated - Outbound

Hi @BarryFletcher ,

 

This is my test data.  

vtangjiemsft_0-1734420893036.png

We can create a new table.

Table 2 = SUMMARIZE('Table',[Staff Name],[#Week],"work_hours",SUM('Table'[Work Hours]))

vtangjiemsft_1-1734420924191.png

If I have misinterpreted your needs, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

10 REPLIES 10
v-tangjie-msft
Community Support
Community Support

Syndicated - Outbound

Hi @BarryFletcher ,

 

This is my test data.  

vtangjiemsft_0-1734420893036.png

We can create a new table.

Table 2 = SUMMARIZE('Table',[Staff Name],[#Week],"work_hours",SUM('Table'[Work Hours]))

vtangjiemsft_1-1734420924191.png

If I have misinterpreted your needs, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Syndicated - Outbound

Thank you very much for the help Neeko, worked perfectly.

 

Barry

danextian
Super User
Super User

Syndicated - Outbound

Hi @BarryFletcher 

The unique count should be based on what columns? - So if these columns were to be combined together, they'd be considered a count.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
HotChilli
Super User
Super User

Syndicated - Outbound

distinctcount of week#

Syndicated - Outbound

Thank you for replying with suggestions but I think I am not clear on what I am looking for....

 

Based on the table below, as you can see 3 people have entered time for week 45 (and other weeks) - is there a way I can get da to look at this table and tell me 3 people have netered time and not count the 2 entries by Allan and Bokic?

 

So from the table below there are 5 entries but I would like to just count that each person has submitted one timesheet?

 

What I am trying to achieve is being able to tell our Pc team that 3 timesheets have been submitted from the data provided knowing the Allan and Bokic submitted one timesheet with 2 charge codes

 

Screenshot 2024-12-13 173747.jpg

 

HotChilli
Super User
Super User

Syndicated - Outbound

Thanks.

Where does the 7 come from? It says "5 timesheets" in the post above.

"submitted 5 timesheets but they contain 15 individual items. The result of my count should say list 7 rows rather than 15?"

Syndicated - Outbound

Sorry - my bad again - am working an typing...

 

It should be "8" - I am trying to count how many timesheet were submitted so if you look at the work weeks (45 - 52) I'd like the count to be "8" timesheets taken from the 15 rows

HotChilli
Super User
Super User

Syndicated - Outbound

15 is the rows for this Staff Name - is that right?

"The result of my count should say list 7 ites" - typo? what does this mean?

Syndicated - Outbound

Typoe - apologies. Should say Rows.

Syndicated - Outbound

Would be better if you just edited your post to make it clearer.





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)