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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
BarryFletcher
Helper III
Helper III

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

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

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. 

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

 

Barry

danextian
Super User
Super User

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.










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


Proud to be a Super User!









"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

distinctcount of week#

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

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?"

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

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?

Typoe - apologies. Should say Rows.

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










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


Proud to be a Super User!









"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.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.