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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
pxp920
Frequent Visitor

Min Value across Multiple Columns, based on Associated Columns

Setup:

I have a situation where coaches manually populate check-ins and progressions against milestones for specific members.  These are collected across multiple tabs (one for or each coach).  The tabs look like this:

pxp920_2-1635974322542.png

 

Important considerations:

  • Members do not progress through milestones lineary; they can regress (e.g. see Member "BR") or advance slower than 1 milestone per week (e.g. see Member "AC")
  • There is only 1 row per member, hence the population of this wide rather than long ( I don't like it either).

Requirement

identify the earliest date in which a milestone was achieved (and latest, but this should be easy if i know how to do the earliest)

 

I was thinking something along the lines of finding identifying all the columns with said milestone and then getting the max value of the positionally offset date columns.  eg:

 

Earliest Milestone 3 Date for Member AC:

  • Columns 5, 7, and 9 (columns with Milestone 3) ->
  • Max across offset -1 (columns 4,6, and 😎  ->
  • 11/5

 

Not sure how to do this, or if it possible as suggested.  Will take any help here!!

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@pxp920 

You first need to make the data table looks like the following, you may check the steps in power query, just some duplicates and remove columns.

 

Vpazhenmsft_1-1636510736007.png

 

Then you should able to find the earliest date with a a measure, also change min to max to get the latest date.

 

Earliest = CALCULATE(MIN([Message Sent]),FILTER('Union Table',[Member]="AC"&&[Milestone]="Milestone 3" ))

Latest = CALCULATE(MAX([Message Sent]),FILTER('Union Table',[Member]="AC"&&[Milestone]="Milestone 3" ))

Vpazhenmsft_0-1636510712986.png

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@pxp920 

You first need to make the data table looks like the following, you may check the steps in power query, just some duplicates and remove columns.

 

Vpazhenmsft_1-1636510736007.png

 

Then you should able to find the earliest date with a a measure, also change min to max to get the latest date.

 

Earliest = CALCULATE(MIN([Message Sent]),FILTER('Union Table',[Member]="AC"&&[Milestone]="Milestone 3" ))

Latest = CALCULATE(MAX([Message Sent]),FILTER('Union Table',[Member]="AC"&&[Milestone]="Milestone 3" ))

Vpazhenmsft_0-1636510712986.png

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

 

Thank you! I ended up restructuring the data from Wide -> Long via union, and then performing the calculation on the long table which made much more sense!

pxp920
Frequent Visitor

Important to note - I have already combined all the data from all the coaches in a unified dataset (via union) on powerbi.  

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.