Forum Discussion

BarryFletcher's avatar
BarryFletcher
Helper III
1 year ago
Solved

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.

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi BarryFletcher ,

     

    This is my test data.  

    We can create a new table.

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

    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. 

10 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi BarryFletcher ,

     

    This is my test data.  

    We can create a new table.

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

    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. 

    • BarryFletcher's avatar
      BarryFletcher
      Helper III

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

       

      Barry

  • HotChilli's avatar
    HotChilli
    Community Champion

    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?

      • danextian's avatar
        danextian
        Super User

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

  • HotChilli's avatar
    HotChilli
    Community Champion

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

    • BarryFletcher's avatar
      BarryFletcher
      Helper III

      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

    • BarryFletcher's avatar
      BarryFletcher
      Helper III

      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

       

       

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