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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
MartinC
Helper I
Helper I

Identify next date in a row

Hi All!

 

I've done a search and couldn't find an answer to what I'm looking for.  Using the table below, I need to identify which activity is next (i.e. after Today()).  For example using todays date, the first one will be "Tech & Prog Review", the second one will be "Commercial Review" etc.  I'm hoping there's a way to get this info in Power BI?

 

MartinC_0-1715777207554.png

 

All help will be appreciated!

 

Martin

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @MartinC ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1715852209682.png

(2) In order not to affect the original datasheet, we can copy a datasheet and then select all the columns and right-click on the unpivot column.

vtangjiemsft_1-1715852495792.pngvtangjiemsft_2-1715852533921.pngvtangjiemsft_3-1715852549732.png

 

(3) We can create a measure and then the result is as follows.

Measure = 
var _a=MINX(FILTER(ALL('Table (2)'),[Value]>TODAY()),[Value])
RETURN CALCULATE(MAX('Table (2)'[Attribute]),FILTER(ALL('Table (2)'),[Value]=_a))

vtangjiemsft_4-1715852590784.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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 @MartinC ,

 

According to your description, here are my steps you can follow as a solution.

(1) This is my test data. 

vtangjiemsft_0-1715852209682.png

(2) In order not to affect the original datasheet, we can copy a datasheet and then select all the columns and right-click on the unpivot column.

vtangjiemsft_1-1715852495792.pngvtangjiemsft_2-1715852533921.pngvtangjiemsft_3-1715852549732.png

 

(3) We can create a measure and then the result is as follows.

Measure = 
var _a=MINX(FILTER(ALL('Table (2)'),[Value]>TODAY()),[Value])
RETURN CALCULATE(MAX('Table (2)'[Attribute]),FILTER(ALL('Table (2)'),[Value]=_a))

vtangjiemsft_4-1715852590784.png

 

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

MartinC
Helper I
Helper I

I also have new columns that are either 1 or 0 based on the date in the columns above being before (1) today, or after today (0).  The new columns are the correct order, so what I'd be looking for is the first one with a 0.

Thanks @IoannisPhilip but I think mine is more complex that those - they are focused on one column, I need the earliest one (name of the column) that is after Today()

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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