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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
unknown_anony
Helper II
Helper II

Search for duplicate and take the latest data out of it

Hello All,
I am trying a logic in ppower bi, below there is a screenshot of my requirement,
It is needed for my project

unknown_anony_2-1716891956084.png

How will i consider duplicates of both the columns and also consider the latest date(Blue highlighted part) of the same ID but different requst no and get the sum of the values?

All Advices are welcomed.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,@unknown_anony Hello,@amitchandak ,thanks for your concern about this issue.
And I would like to share some additional solutions below

According to your description, you want to achieve something like this in power bi:

Flag Submitted Time records that have the same ID but different Request No's.
like this:

vjtianmsft_0-1717561156262.png

If my understanding is correct, you can refer to my test below

 

My original data is as follows: (I added an โ€œindexโ€ column to prevent Power BI from automatically aggregating duplicate data)

vjtianmsft_1-1717561170881.png

By creating a measure and filtering each row of data in the visual, you can filter the result

I have created three measures

Here is the Dax code:

 

M_1 = 
CALCULATE(COUNT('Table'[Request No]),FILTER(ALL('Table'),'Table'[ID]=MAX('Table'[ID])&&'Table'[Request No]=MAX('Table'[Request No])))
M_2 = 
CALCULATE(COUNT('Table'[ID]),FILTER(ALL('Table'),'Table'[ID]=MAX('Table'[ID])))
M_result = 
IF([M_1]=1 && [M_2]>1,
1,0)

 

Here is the result๏ผš

vjtianmsft_2-1717561225860.pngvjtianmsft_3-1717561231689.png

 

 

vjtianmsft_4-1717561239071.png

Set the background color of the [ID], [Request No], [Submitted Time] columns according to the results of the three measures.
like this:

vjtianmsft_5-1717561271899.pngvjtianmsft_6-1717561279927.png

vjtianmsft_7-1717561289006.png

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

Best Regards,

Carson Jian,

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

4 REPLIES 4
Anonymous
Not applicable

Hi,@unknown_anony Hello,@amitchandak ,thanks for your concern about this issue.
And I would like to share some additional solutions below

According to your description, you want to achieve something like this in power bi:

Flag Submitted Time records that have the same ID but different Request No's.
like this:

vjtianmsft_0-1717561156262.png

If my understanding is correct, you can refer to my test below

 

My original data is as follows: (I added an โ€œindexโ€ column to prevent Power BI from automatically aggregating duplicate data)

vjtianmsft_1-1717561170881.png

By creating a measure and filtering each row of data in the visual, you can filter the result

I have created three measures

Here is the Dax code:

 

M_1 = 
CALCULATE(COUNT('Table'[Request No]),FILTER(ALL('Table'),'Table'[ID]=MAX('Table'[ID])&&'Table'[Request No]=MAX('Table'[Request No])))
M_2 = 
CALCULATE(COUNT('Table'[ID]),FILTER(ALL('Table'),'Table'[ID]=MAX('Table'[ID])))
M_result = 
IF([M_1]=1 && [M_2]>1,
1,0)

 

Here is the result๏ผš

vjtianmsft_2-1717561225860.pngvjtianmsft_3-1717561231689.png

 

 

vjtianmsft_4-1717561239071.png

Set the background color of the [ID], [Request No], [Submitted Time] columns according to the results of the three measures.
like this:

vjtianmsft_5-1717561271899.pngvjtianmsft_6-1717561279927.png

vjtianmsft_7-1717561289006.png

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.

Best Regards,

Carson Jian,

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



Thank you,
much appreaciated for your help

unknown_anony
Helper II
Helper II

@amitchandak thank you but this did not help 

unknown_anony_0-1717046782017.png

i have shared the real data, The SFDC column have duplicate, i have to check whther the request number is same or not for same sfdc number, if the request  is different i have to consider the latest submit date among them given in the screenshot, is it possible to achieve that?
need some quick help, very urgent for my work.

amitchandak
Super User
Super User

@unknown_anony , refer if these two blogs, how to get latest data can help

https://amitchandak.medium.com/power-bi-get-the-last-latest-value-of-a-category-d0cf2fcf92d0

https://amitchandak.medium.com/power-bi-get-the-sum-of-the-last-latest-value-of-a-category-f1c839ee8...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.