Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Distinct Count For More Than One Value

Hi! I am trying to calculate days since an item was last purchased. I know for the datediff function I can not have the same date multiple times. However, I have had multiple different Items purchased on the same day, I am trying to figure out if there is a way to filter (or distinct) to keep the day an Item was purchased but remove repeating Items if they were bought on the same day. 

 

My Data Currently:                                                 

 

(More dates in my actual table)

Trying to create

5/2/22A
5/2/22B

5/2/22

C

5/5/22

 

A

 

Thanks!

  • Hi Anonymous ,

     

    Try below calculated table.

    Table 2 = SUMMARIZE('Table','Table'[Date],'Table'[Item])

     

    If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


    Best Regards,
    Henry


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

  • Hi,

    In the Query Editor, select both columns, right click and select "Remove Duplicates".

5 Replies

  • v-henryk-mstf's avatar
    v-henryk-mstf
    Community Support

    Hi Anonymous ,

     

    Try below calculated table.

    Table 2 = SUMMARIZE('Table','Table'[Date],'Table'[Item])

     

    If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


    Best Regards,
    Henry


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

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank You!

  • Hi,

    In the Query Editor, select both columns, right click and select "Remove Duplicates".

  • Hi,

    In the Query Editor, select both columns, right click and select "Remove Duplicates".

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you!