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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
JoeCrozier
Helper II
Helper II

Display first chronological result from Power Query in Power bi without filtering

I have data like this:

JoeCrozier_0-1698081381753.png

That I'd like to incorporate into this table on a dashboard:

JoeCrozier_1-1698081437824.png

 

Specifically I'd like to create "IRB of Record" which is the first chronological entry per study for IRB_Committee, for each "CIRB" entry.  So for instance, this:

JoeCrozier_2-1698081543936.png

 

In the table on the dashboard, there are several query sources being used, they are all linked by "Protocol_no".

I'm sure I could sort my table by earliest row for each study etc... but I dont want to FILTER because I may need later action dates for other columns.. etc...

Long story short how can I add a column like this without deleting any source data by filtering?

JoeCrozier_3-1698081748229.png

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @JoeCrozier 

You can refer to the following solution.

Sample data 

vxinruzhumsft_0-1698203791491.png

1.Create a rank column in table

Rank = RANKX(FILTER('Table',[PROTOCOL_NO]=EARLIER('Table'[PROTOCOL_NO])&&[Type_]=EARLIER('Table'[Type_])),[ACTION_DATE],,ASC) 

2.Then create a measure

Measure = CALCULATE(MAX('Table'[IRB_COMMITTEE]),'Table'[Type_]="CIRB",'Table'[Rank]=1,'Table'[PROTOCOL_NO] IN VALUES('Table'[PROTOCOL_NO]),REMOVEFILTERS())

Output

vxinruzhumsft_1-1698203947600.png

 

Best Regards!

Yolo Zhu

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

3 REPLIES 3
Anonymous
Not applicable

Hi @JoeCrozier 

You can refer to the following solution.

Sample data 

vxinruzhumsft_0-1698203791491.png

1.Create a rank column in table

Rank = RANKX(FILTER('Table',[PROTOCOL_NO]=EARLIER('Table'[PROTOCOL_NO])&&[Type_]=EARLIER('Table'[Type_])),[ACTION_DATE],,ASC) 

2.Then create a measure

Measure = CALCULATE(MAX('Table'[IRB_COMMITTEE]),'Table'[Type_]="CIRB",'Table'[Rank]=1,'Table'[PROTOCOL_NO] IN VALUES('Table'[PROTOCOL_NO]),REMOVEFILTERS())

Output

vxinruzhumsft_1-1698203947600.png

 

Best Regards!

Yolo Zhu

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

 

This worked great! Thank you! I accepted it as a solution but actually I have one question (that I hadnt included originally) thats related and maybe you could help with.   So this measure totally returns the correct values, problem is:  not every row HAS a value.  I.e. not every protocol has a CIRB row.  This is expected behavior and I'd love to just show those rows as blank on the dashboard.  Problem is, if theres no result in the measure for those rows, they just aren't included on the dashboard.   How can i still show the blank row?

 

That make sense?

lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

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.