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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Measure to Show Previously Used PO Number

Hi Experts

 

I need a calculated column to show instants where the PO Number has been previously used in the past based on date and the Order value is the same (as shown below). End result to show a new column "Duplicated Entry"

 

PO IDPO NumberOrder ValueDateMatch
3056200000392316/12/20210
7898100000392318/02/20221
1 ACCEPTED SOLUTION
ribisht17
Super User
Super User

@Anonymous 

 

Step 1: ///Get me the PO numbers having the duplicate values

Count Rows for PO= CALCULATE(COUNTROWS(Match),FILTER(all(Match),Match[PO Number]=max(Match[PO Number])&& Match[Order Value]=MAX(Match[Order Value])))
 
Step2 Minimum Date for any PO (Group by PO)
Min Date for PO = CALCULATE(MIN(Match[Date]),FILTER(all(Match),Match[PO Number]=max(Match[PO Number])))
 
Step3
Final Solution = if(Match[Count Rows for PO]>=2 && max(Match[Date]) > Match[Min Date for PO],"Matched","")
 
ribisht17_0-1652177204748.png

 

Regards,

Ritesh

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 

 

View solution in original post

1 REPLY 1
ribisht17
Super User
Super User

@Anonymous 

 

Step 1: ///Get me the PO numbers having the duplicate values

Count Rows for PO= CALCULATE(COUNTROWS(Match),FILTER(all(Match),Match[PO Number]=max(Match[PO Number])&& Match[Order Value]=MAX(Match[Order Value])))
 
Step2 Minimum Date for any PO (Group by PO)
Min Date for PO = CALCULATE(MIN(Match[Date]),FILTER(all(Match),Match[PO Number]=max(Match[PO Number])))
 
Step3
Final Solution = if(Match[Count Rows for PO]>=2 && max(Match[Date]) > Match[Min Date for PO],"Matched","")
 
ribisht17_0-1652177204748.png

 

Regards,

Ritesh

Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.