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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
radovankubis
New Member

Calculated measure returning Text

HI Guys, I am quite new in the community - please be patient with me.

I have below table:

 

 

Mfr Pt No - MD04Product DescriptionSTRATSYD1-01MAC1-01SYD1-SNSYD1-WL
24888WHEEL C/OFF A46TBF41 M/INOX 127X2.0X22MMA 200  
24888WHEEL C/OFF A46TBF41 M/INOX 127X2.0X22MMB319   
24888WHEEL C/OFF A46TBF41 M/INOX 127X2.0X22MMH  15 
24888WHEEL C/OFF A46TBF41 M/INOX 127X2.0X22MMG   10
25205SCREW SET HEX HD SS316 METRIC 6X30MMB3613062  
25205SCREW SET HEX HD SS316 METRIC 6X30MMH   0

 

What am I trying to achieve is to create 4 measures (or columns) which would retrieve the respective STRAT - for product and for MAC, SYD,..

Mfr Pt No - MD04Product Description SYD1-01Strat SYD1-01MAC1-01Strat MAC1-01SYD1-SNStrat SYD1-SNSYD1-WLStrat SYD1-WL
24888WHEEL C/OFF A46TBF41 M/INOX 127X2.0X22MM319B200A15H10G
25205SCREW SET HEX HD SS316 METRIC 6X30MM 361B3062B  0H
25925PAIL INC LID WHITE PLASTIC 20L 1629A7731A  87B
25823PAIL INC LID WHITE PLASTIC 10L 0A1493A9A113A

 

Could you please help me please.

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

Hi radovankubis,

 

To achieve your requiremnet, please refer to steps below:

1. Click Query Editor->Add Column->Custom Column and add 4 custom columns using formula:

 

    #"Added Custom" = Table.AddColumn(#"Changed Type", "Strat SYD1-01", each if [#"SYD1-01"] <> null then [STRAT] else null),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "Strat MAC1-01", each if [#"MAC1-01"] <> null then [STRAT] else null),
    #"Added Custom2" = Table.AddColumn(#"Added Custom1", "Strat SYD1-SN", each if [#"SYD1-SN"] <> null then [STRAT] else null),
    #"Added Custom3" = Table.AddColumn(#"Added Custom2", "Strat SYD1-WL", each if [#"SYD1-WL"] <> null then [STRAT] else null)

1.PNG

2. After applied, create a table visual like below:

 

2.PNG

 

Regards,

Jimmy Tao

View solution in original post

2 REPLIES 2
v-yuta-msft
Community Support
Community Support

Hi radovankubis,

 

To achieve your requiremnet, please refer to steps below:

1. Click Query Editor->Add Column->Custom Column and add 4 custom columns using formula:

 

    #"Added Custom" = Table.AddColumn(#"Changed Type", "Strat SYD1-01", each if [#"SYD1-01"] <> null then [STRAT] else null),
    #"Added Custom1" = Table.AddColumn(#"Added Custom", "Strat MAC1-01", each if [#"MAC1-01"] <> null then [STRAT] else null),
    #"Added Custom2" = Table.AddColumn(#"Added Custom1", "Strat SYD1-SN", each if [#"SYD1-SN"] <> null then [STRAT] else null),
    #"Added Custom3" = Table.AddColumn(#"Added Custom2", "Strat SYD1-WL", each if [#"SYD1-WL"] <> null then [STRAT] else null)

1.PNG

2. After applied, create a table visual like below:

 

2.PNG

 

Regards,

Jimmy Tao

radovankubis
New Member

Hi All,

 

I am fairly new the community so please be patient.

I have below table:

 

Mfr Pt No - MD04Product DescriptionSTRATSYD1-01MAC1-01SYD1-SNSYD1-WL
24888WHEEL C/OFF A46TBF41 M/INOX 127X2.0X22MMA 200  
24888WHEEL C/OFF A46TBF41 M/INOX 127X2.0X22MMB319   
24888WHEEL C/OFF A46TBF41 M/INOX 127X2.0X22MMH  15 
24888WHEEL C/OFF A46TBF41 M/INOX 127X2.0X22MMG   10
25205SCREW SET HEX HD SS316 METRIC 6X30MMB3613062  
25205SCREW SET HEX HD SS316 METRIC 6X30MMH   0

 

what I am trying to achieve is below:

 

Mfr Pt No - MD04Product Description SYD1-01Strat SYD1-01MAC1-01Strat MAC1-01SYD1-SNStrat SYD1-SNSYD1-WLStrat SYD1-WL
24888WHEEL C/OFF A46TBF41 M/INOX 127X2.0X22MM319B200A15H10G
25205SCREW SET HEX HD SS316 METRIC 6X30MM 361B3062B  0H
25925PAIL INC LID WHITE PLASTIC 20L 1629A7731A  87B
25823PAIL INC LID WHITE PLASTIC 10L 0A1493A9A113

A

 

I am looking for a way how to avieve this STRAT per each Mac/Syd column (its exactly 4 columns)  either through powerquery, calculated column or measure. 

 

Thank you for your opinions.

 

Rado

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 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.

Top Solution Authors