Forum Discussion
Data compassion based on the date within the same table
Hi,
In data table contain three columns are Date, item and branch. In data table the item and branch columns contain duplicate entry according to the date.
what are the items are newly added from this week data comparing to last week date.
Here last week means is Min Date and this week means Max date.
I am looking for new table and measure option in order to achieve my desired result. (The Desired result must be unique)
Data Table:
Date Item Branch
10-03-2021 123 A01
10-03-2021 123 A01
10-03-2021 123 A02
10-03-2021 123 A03
10-03-2021 123 A04
10-03-2021 123 A05
10-03-2021 123 A06
10-03-2021 123 A07
10-03-2021 123 A07
10-03-2021 128 A07
10-03-2021 128 A07
11-03-2021 123 A01
11-03-2021 123 A01
11-03-2021 123 A02
11-03-2021 123 A03
11-03-2021 123 A04
11-03-2021 123 A05
11-03-2021 123 A06
11-03-2021 123 A07
11-03-2021 123 A07
11-03-2021 126 A01
11-03-2021 126 A01
11-03-2021 127 A01
DESIRED RESULT
11-03-2021 126 A01
11-03-2021 127 A01
- Anonymous5 years ago
HI Saxon10
Create a new table
remove_duplicate =
SUMMARIZE(Tabl,tabl[date],tabl[item],tabl[branch],"Cnt",count(Tabl[Item]))and ignore the last column "cnt"
4 Replies
- AllisonKennedy
Community Champion
Saxon10 I think you want to compare new items to existing items, same idea as finding existing vs new customers. See if this post helps:
https://www.sqlbi.com/articles/computing-new-customers-in-dax/
- Saxon10
Post Prodigy
I follow up the article but still I am struggling to figure out the result. Can you please advise
- AnonymousNot applicable
HI Saxon10
Create a new table
remove_duplicate =
SUMMARIZE(Tabl,tabl[date],tabl[item],tabl[branch],"Cnt",count(Tabl[Item]))and ignore the last column "cnt"
- Saxon10
Post Prodigy
Hi,
Thank so much for your help and sorry for the late reply. Your solution working working well.