Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi , i have a requirement to complete in Power Query.
Given scenario is this ,
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.
Solved! Go to Solution.
@Anonymous ,
If you can add an index column like below, then you can use python script to meet your requirement.
# 'dataset' holds the input data for this script
import pandas as pd
dataset = dataset.pivot(index = 'Index', columns = 'Column1', values = 'Column2')
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.
@Anonymous ,
If you can add an index column like below, then you can use python script to meet your requirement.
# 'dataset' holds the input data for this script
import pandas as pd
dataset = dataset.pivot(index = 'Index', columns = 'Column1', values = 'Column2')
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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 47 | |
| 43 | |
| 40 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 25 |