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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

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
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.