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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

Get last known value

Hi all,

 

i'm trying to get the last know value from a table, but can't figure out the steps to do it.

The goal is to have a name for each role. So if a name isn't entered in the yearmonth, it should fall back to the previous month and retrieve it. So when i filter on yearmonth = 2021 05, it should show the green values and all values that aren't available should come from 2021 04.

ozcel600_0-1623913179158.png

 

What have i tried so far: created a temp table which stores all roles and crossjoined it, but that didn't turn out what i was hoping for. I searched this forum on "get last known value", but couldn't find something that's similar to this problem. So i'm hoping you can point me in the right direction.

 

Tnx in advance

1 ACCEPTED SOLUTION
AlB
Community Champion
Community Champion

@Anonymous 

Not sure I understand. Do you want this in a visualor in PQ?

Why are there two entries for Asset manager in 2021 05? I've eliminated the last one.

Check the attached file for a possible solution

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

 

View solution in original post

4 REPLIES 4
AlB
Community Champion
Community Champion

@Anonymous 

Not sure I understand. Do you want this in a visualor in PQ?

Why are there two entries for Asset manager in 2021 05? I've eliminated the last one.

Check the attached file for a possible solution

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

 

Anonymous
Not applicable

This is truly wonderful. Thank you a lot @AlB 

AlB
Community Champion
Community Champion

Hi @Anonymous 

1. Where is the list with  all the roles that are to be shown?

2. Can you share the sample data above in text-tabular format so that the contexts can be copied. Just paste the contents of the Excel, PBI table here.

3. Show the exact expected result based on that sample data

 

SU18_powerbi_badge

Please accept the solution when done and consider giving a thumbs up if posts are helpful. 

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

 

Anonymous
Not applicable

Hi @AlB ,

 

1. These are all the roles:

Assetmanager

Productiemanager OB

Locatiemanager regio

Maintenance Engineer

Reliabilty Engineer

Business controller

Vlootsupport

Productie Engineer

Supply Chain Management

Reiniging

 

2. can't seem to copy/past an excel: 

Role Yearmonth Name

Assetmanager 2021 04 AA

Productiemanager OB 2021 04 BB

Locatiemanager regio 2021 04 CC

Maintenance Engineer 2021 04 DD

Reliabilty Engineer 2021 04 EE

Business controller 2021 04 FF

Vlootsupport 2021 04 GG

Productie Engineer 2021 04 HH

Supply Chain Management 2021 04 II

Reiniging 2021 04 JJ

Assetmanager 2021 05 AAA

Productiemanager OB 2021 05 BBB

Locatiemanager regio 2021 05 CCC

Maintenance Engineer 2021 05 DDD

Reliabilty Engineer 2021 05 EEE

Assetmanager 2021 05 AAAA

 

3. This is the expected result

ozcel600_4-1623914610442.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.