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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
cascador84
Helper I
Helper I

Calculated field in Power BI to repeat value in sublevels

Hello,

 

I'm wondering if it was possible to repeat a column value into sublevel record. The link between main dataset (A)  et second Dataset (B) is the hierarchy value

I.e

 

A.Code A.hierachy A.level B.valuetopeat
John 1/ 1 

Senior

Smith 1/2 2     --> no data by default, need "Senior"
Wesson 1/2/3 3    --> no data by default, need "Senior"
Syl 2/ 1 "Junior"
Ves 2/1 2 --> no data by default, need "Junior"
Ter 2/1/1 3 --> no data by default, need "Junior"

 

Or another approach to get same results could be (always with dataset A & B, but having parent-child columns)

 

A.Key A.parentKey A.Code B.valuetoRepeat
1   John Senior
2 1 Smith --> no data by default, need "Senior"
3 2 Wesson --> no data by default, need "Senior"
4   Syl "Junior"
5 4 Ves --> no data by default, need "Junior"
6 5 Ter --> no data by default, need "Junior"

 

Thank you

regards,

 

1 REPLY 1
v-xinruzhu-msft
Community Support
Community Support

Hi @cascador84 

Can you provide some sample data of dataset A and dataset B, so that I can offer more suggestion for you.

I cannot know the data structure of two tables. 

 

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.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.