cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
kalkito New Member
New Member

Need some help with dax to transform a table

Hi, new at PBI

 

I need help to tranform some attributes the folowing way:

 

In each line first airport can be an origin and/or a destination, depending on if there is >0 in take off (then it´s an origin) or a destination if landings is more or equal then one. The same with passengers.

 

Attributes: Date / Aiport A / Airport B / number of Landings / number of Take-off / Pax landed / Pax take-off

 

Observation example1: 01-01-2018 / Lisbon / London / 2 / 3 / 50 / 20 >>>>Lisbon is a destination, London an origin, pax landed 50 (two movements totalling 50 pax) + Lisbon is a ORIGIN, London an DESTINATION, pax took off =20 (three movements totalling 20 pax) 

This means I need to convert one line in two lines with these rules.

 

Observation example2: 01-02-2018 / Lisbon / London / 2 / 0 / 50 / 0 >>>>> Lisbon is a destination, London an origin, pax landed 50 (two movements totaling 50 pax)

This means no convertion here.        

 

Any advice?

 

Many thanks in advance.

 

Paulo

 

 

1 REPLY 1
Community Support Team
Community Support Team

Re: Need some help with dax to transform a table

Hi @kalkito,

 

Can you please share some sample data with expected result to help us clarify your requirement and test to coding formula?

How to Get Your Question Answered Quickly

 

Notice:

1. you can upload same data to onedrive or google drive then share link here.
2. do mask on sensitive data before sharing.

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 357 members 3,619 guests
Please welcome our newest community members: