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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

In one side table, "Adding a Calculated Column from the many side table

Hadi2021_1-1714062035727.png

Hi all
The provided Power BI data model includes 'Date' and 'Stores' as dimension tables and 'Managers' as a fact table, linked by a one-to-many relationship.

Can you help me  to create a calculated column in the 'Stores' table to display the latest manager entry from the 'Managers' table, as depicted in the illustration.

Thanks in advance 
regards 

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

 

Here are the steps you can follow:

1. Create calculated column.

Mg =
var _date=
MAXX(
    FILTER(ALL('Managers'),
    'Managers'[Stores]=EARLIER('Stores'[Stores])),[Date])
return
MAXX(
    FILTER(ALL('Managers'),
    'Managers'[Stores]=EARLIER('Stores'[Stores])&&'Managers'[Date]=_date),'Managers'[Manager])

2. Result:

vyangliumsft_0-1714096512740.png

 

Best Regards,

Liu Yang

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

2 REPLIES 2
ryan_mayu
Super User
Super User

@Anonymous 

is this what you want?

Column =
maxx(FILTER(RELATEDTABLE('Manager'),'Manager'[Date]=maxx(RELATEDTABLE('Manager'),'Manager'[Date])),'Manager'[Manager])
 
11.PNG
 
pls see the attachment below
 




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




v-yangliu-msft
Community Support
Community Support

Hi  @Anonymous ,

 

Here are the steps you can follow:

1. Create calculated column.

Mg =
var _date=
MAXX(
    FILTER(ALL('Managers'),
    'Managers'[Stores]=EARLIER('Stores'[Stores])),[Date])
return
MAXX(
    FILTER(ALL('Managers'),
    'Managers'[Stores]=EARLIER('Stores'[Stores])&&'Managers'[Date]=_date),'Managers'[Manager])

2. Result:

vyangliumsft_0-1714096512740.png

 

Best Regards,

Liu Yang

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

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.