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

July 28 - August 9 | Final Round of the Power BI Dataviz World Championships. This is your chance. Learn more

Reply
WilliamAzevedo
Helper III
Helper III

Status column based on another table

Hello, everyone.

 

I manage projects through a table and it's Statuses through a proper table with that goal. Example:

 

Statuses

StatusProjectDate
CanceledP312/01/2024
CompletedP210/23/2024
StartedP112/15/2024
StartedP209/05/2024
StartedP311/18/2024

 

Projects:

ProjectStatus
P1Started
P2Completed
P3Canceled

 

As above, I would like the Status column to show the Status info based on the most recent date of the Status column in the Statuses table. The tables are linked by the Project column. Is it possible?

 

Thank you in advance!

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_1-1734456484594.png

 

 

Jihwan_Kim_0-1734456463764.png

 

 

Status CC =
VAR _currentproject = Projects[Project]
VAR _latestdate =
    MAXX ( RELATEDTABLE ( Statuses ), Statuses[Date] )
RETURN
    CALCULATE (
        MAX ( Statuses[Status] ),
        Statuses[Date] = _latestdate,
        Statuses[Project] = _currentproject
    )

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

View solution in original post

3 REPLIES 3
WilliamAzevedo
Helper III
Helper III

The formatting was weird and I had to delete my first reply. I hope it goes right this time.

The first time I tried, I had this error:

 

A single value for column '…' in table '…' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.

 

Then I searched in the forums what it meant and I found this topic: Solved: Re: A Single Value for Column Cannot Be Determine... - Microsoft Fabric Community

I followed the instructions Greg_Deckler posted here: Solved: Re: A Single Value for Column Cannot Be Determine... - Microsoft Fabric Community

 

My code ended up this way:

UltimoStatus = 
VAR proj_at = MAX(lst_projetos_unfa[Projeto e Processo])
VAR ult_data =
    MAXX(RELATEDTABLE(lst_evolucao_projetos_unfa), lst_evolucao_projetos_unfa[Data])
RETURN
    CALCULATE(
        MAX(lst_evolucao_projetos_unfa[Status]),
        lst_evolucao_projetos_unfa[Data] = ult_data,
        lst_evolucao_projetos_unfa[Projeto e Processo] = proj_at
    )

 

An it worked! I hope the post goes correctly this time and I can properly say thank you!

WilliamAzevedo
Helper III
Helper III

I'm having problems to reply. I will leave a complete reply here soon.

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

 

Jihwan_Kim_1-1734456484594.png

 

 

Jihwan_Kim_0-1734456463764.png

 

 

Status CC =
VAR _currentproject = Projects[Project]
VAR _latestdate =
    MAXX ( RELATEDTABLE ( Statuses ), Statuses[Date] )
RETURN
    CALCULATE (
        MAX ( Statuses[Status] ),
        Statuses[Date] = _latestdate,
        Statuses[Project] = _currentproject
    )

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

Fabric Community Sticker Design Challenge Barcelona Carousel

Fabric Community Sticker Challenge - Barcelona 2026

If you love stickers, then you will definitely want to check out our community sticker challenge, Barcelona edition!

July Power BI Update Carousel

Power BI Monthly Update - July 2026

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

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors