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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
HishamAT
Helper II
Helper II

Combine delay reasons into one line

I have a table containing flight number and delay reason 1, delay reason 2 and delay reason 3 how can I make the delays in one line with a new line after each delay reason using Dax

 

Flight NumDelay 1Delay 2Delay 3
12LateXLateY

LateZ

13LateALateB

LateC

 

To Be in the presentation of power bi

Flight NumDelays
12

LateX

LateY

LateZ

13 

LateA

LateB

LateC

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @HishamAT 
If the visual on your image is your final goal you can create a measure like :

Delays = MAX('Table (2)'[Delay 1]) &UNICHAR(10) &MAX('Table (2)'[Delay 2]) &UNICHAR(10)&MAX('Table (2)'[Delay 3]) &UNICHAR(10)
Ritaf1983_0-1726928379364.png

If not you will need these reasons as some categories than rather you should unpivot your table from PQ:

Ritaf1983_1-1726928494252.png

and after closing and applying create the hierarchies matrix:

Ritaf1983_2-1726928580491.png

more information about unpivot is here :
https://www.youtube.com/watch?v=tAIqopmj9RA
The pbix  with both solutions is attached 

If my answer was helpful please give me a Kudos and accept as a Solution.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

PBI file attached.

Hope this helps.

Ashish_Mathur_0-1726978140893.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ritaf1983
Super User
Super User

Hi @HishamAT 
If the visual on your image is your final goal you can create a measure like :

Delays = MAX('Table (2)'[Delay 1]) &UNICHAR(10) &MAX('Table (2)'[Delay 2]) &UNICHAR(10)&MAX('Table (2)'[Delay 3]) &UNICHAR(10)
Ritaf1983_0-1726928379364.png

If not you will need these reasons as some categories than rather you should unpivot your table from PQ:

Ritaf1983_1-1726928494252.png

and after closing and applying create the hierarchies matrix:

Ritaf1983_2-1726928580491.png

more information about unpivot is here :
https://www.youtube.com/watch?v=tAIqopmj9RA
The pbix  with both solutions is attached 

If my answer was helpful please give me a Kudos and accept as a Solution.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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