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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Take the value of column that satify condition and apply it for other columns

Hello friends,

 

I have a challenged question.

 

I have this data: 

FirstLevelActivitycodeSecondLevelActivitycodeThirdLevelActivitycodeLabelParentCode
AB NaxosA|B
AC MikonosA|C
ACFAtheneA|C | F
AD PirosA|D
A  SalaminaA|
ACGAthosA|C | G
AE LefkadaA|E

 

I already use the function Path and Pathitem to get the firstlevelactivitycode and second ...

My goal is to have this data: 

FirstLevelActivitycodeSecondLevelActivitycodeThirdLevelActivitycodeLabelParentCodeFirstLevelLabelSecondLevelLabelThirdLevelLabel
AB NaxosA|BSalaminaSalamina | Naxos 
AC MikonosA|CSalaminaSalamina | Mikonos
ACFAtheneA|C | FSalaminaSalamina | MikonosSalamina | Mikonos | Athene
AD PirosA|DSalaminaSalamina | Piros 
A  SalaminaASalamina  
ACGAthosA|C | GSalaminaSalamina | MikonosSalamina | Mikonos | Athos
AE LefkadaA|ESalaminaSalamina | Lefkada

The idea now is to say that for example if secondlevel & third level, memorize this label for this [A]  FirstLevelActivitycode, and put the label in all the rows of FirstLevelLabel. 

I think of something like that put does not work correctly:

FirstLevelLabel = IF(ISBLANK([SecondLevel]) || ISBLANK([ThirdLevel]) || keco_ref_activity_fields[FirstLevelActivtycode] = "O_738"  ;RELATED(keco_ref_activity_fields[Label]);BLANK())
The same logic will be for SecondLevelLabel with this idea: 
SecondLevelLabel = CONCATENATE(IF(ISBLANK(keco_ref_activity_fields[SecondLevel]);Blank();   keco_ref_activity_fields[FirstLevelLabel] & " | ")  ;   IF(AND(ISBLANK([FirstLevelLabel]);ISBLANK([ThirdLevel]));keco_ref_activity_fields[Label];BLANK())) 
 
 
Note that is one example, the idea is to generalize the solution so if we have FirstLevelActivitycode = A1 for example and other value, it make the same process.
Can anyone bring idea and help on this.
 
thank you.
 
Best regards,
Salem

 

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous 

 

I have understood your requirement, but I have a query to confirm with you regarding your data, regarding the FirstLevelActivitycode column "A1" and the "O_738" mentioned in your formula, What is the form of their ParentCode? Is it O_738|xxx, or O?

 

Best Regards,
Yulia Xu

Anonymous
Not applicable

Hello, 

 

any solution for that.

 

thank you 🙂

Salem

Anonymous
Not applicable

Hi,

 

Thank you for your response.

 

The firstlevelactivtycode is one level: A or B ... 

I have the parentcode instead that contains the different level with |. 

 

But my main issue is to divide the label, the  levelactivitycode is already divided.

 

Best regards,

Salem

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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