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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Modifying report

Hi , i have a requirement to complete in Power Query.

 

Given scenario is this ,

 bi6.PNG

 

Output Required is this : 

 

Period      |  Exchange rate(euro)   |  Exchange rate(usd)  |

4/1/2019            77.05                             68.7

 

and the other values are continued below.              Period , exchange rates should be the column headers.

 

Is this possible in Power Query? I can't use DAX as i still need to model the data further , any help would be appreciated.

2 ACCEPTED SOLUTIONS
v-yuta-msft
Community Support
Community Support

@Anonymous ,

 

If you can add an index column like below, then you can use python script to meet your requirement.

1.PNG 

 

# 'dataset' holds the input data for this script

import pandas as pd

dataset = dataset.pivot(index = 'Index', columns = 'Column1', values = 'Column2')

 2.PNG 

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

Hi @Anonymous 

 

On the attached, you will find a solution using Power Query, if you have an extra ID column that could be used to group these 3 records together then skip prior steps and jump straight to Grouped Rows step.

image.png

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

View solution in original post

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

@Anonymous ,

 

If you can add an index column like below, then you can use python script to meet your requirement.

1.PNG 

 

# 'dataset' holds the input data for this script

import pandas as pd

dataset = dataset.pivot(index = 'Index', columns = 'Column1', values = 'Column2')

 2.PNG 

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Hi @Anonymous 

 

On the attached, you will find a solution using Power Query, if you have an extra ID column that could be used to group these 3 records together then skip prior steps and jump straight to Grouped Rows step.

image.png

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.