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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
wonkavator
New Member

Conditional column output based on value from one column and date difference from a second column

 
Hi,

 

I using power query and am trying to create a conditional column highlighted in the black square in the image. The conditional column would output "New" if there is no other row in the file where the value in the Drug and ID column is an exact match to the current row OR if the data does match, the date difference must 1 year or greater. The conditional column would output "Refill" if there is an exact match in the Drug and ID column AND date difference is within 1 year. The example provided shows the desired output. Hoping this is possible. Thanks in advance!

tempsnip.png

1 ACCEPTED SOLUTION
Jakinta
Solution Sage
Solution Sage

This might help.

Jakinta_0-1680821461775.png

Result:

Jakinta_1-1680821501377.png

 

 

View solution in original post

1 REPLY 1
Jakinta
Solution Sage
Solution Sage

This might help.

Jakinta_0-1680821461775.png

Result:

Jakinta_1-1680821501377.png

 

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

Top Solution Authors
Top Kudoed Authors