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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Dakotars
Frequent Visitor

Identifying latest status within a given year?

Hi there,

 

I have a calculated column with the following status fields: 1. Surveyed, 2. Interviewed, 3. Scheduled, 4. Eligible, and 5. Removed. 

 

I'm having an issue where there are several different statuses within a year, for example Client A was removed in January but was then Surveyed in October. When I try to determine participation rates, I'm getting two statuses for Client A, when I only care about what the latest status is (the October one).

 

Anyone have any ideas for creating a calculated column that looks at the latest status within a year?

 

Thanks!

Dakota

1 ACCEPTED SOLUTION

@Dakotars,

 

You can create a new table to get the last survey date for each client in the each year.

Table = SUMMARIZE(Table1,Table1[Client Code],Table1[Survey status year],"LastDate",CALCULATE(MAX(Table1[Survey Month]),ALLEXCEPT(Table1,Table1[Client Code],Table1[Survey status year])))

 Capture.PNG

 

Then create a calculate column to get the status by using LOOKUPVALUE function.

status = LOOKUPVALUE(Table1[Status for this year?],Table1[Client Code],'Table'[Client Code],Table1[Survey Month],'Table'[LastDate])

Capture1.PNG

 

Regards,

Charlie Liao

View solution in original post

6 REPLIES 6
Dakotars
Frequent Visitor

Below is a sample of what I'm looking at. As you can see, there are two statuses for Client A, I'd like to return the surveyed value. I'm thinking if I keep the numbers in front I can utilize the MIN function. Is there a way to evaluate MIN for a specific Client value?

 

ClientSurvey YearStatus for this year?
Client A 20175. Removed
Client B2016 
Client C20171. Surveyed
Client D20172. Eligible
Client A 20171. Surveyed
Client C20172. Eligible

Hi @Dakotars,

 

Do you have the whole date ( for example Year Month Day) or you simply have Survey Year?

 

Ninter

I have the whole date available. However, I only want to look at this based on the current year, which is why I created the 'Status for this year' field

But for example I will based my formula on this field ( whole year) to grab for example the latest date.

 

If you can give another sample with the date I can give it a try.

 

Ninter

Gotcha! Below is a revised sample. Is there a way to provide only the latest date within the given year? i.e. if status for this year is blank or if survey status year = 2017?

 

Client CodeSurvey MonthWave NumberSurvey status yearStatus for this year?
Client A 1/1/2017720175. Removed
Client B11/1/201652016 
Client C5/1/20171120171. Surveyed
Client D6/1/20171220172. Eligible
Client A 7/1/20171320171. Surveyed
Client C8/1/20171420172. Eligible

@Dakotars,

 

You can create a new table to get the last survey date for each client in the each year.

Table = SUMMARIZE(Table1,Table1[Client Code],Table1[Survey status year],"LastDate",CALCULATE(MAX(Table1[Survey Month]),ALLEXCEPT(Table1,Table1[Client Code],Table1[Survey status year])))

 Capture.PNG

 

Then create a calculate column to get the status by using LOOKUPVALUE function.

status = LOOKUPVALUE(Table1[Status for this year?],Table1[Client Code],'Table'[Client Code],Table1[Survey Month],'Table'[LastDate])

Capture1.PNG

 

Regards,

Charlie Liao

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors