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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
manishbhamare97
Frequent Visitor

Data Transformation in Power Bi

I need helpt to tranform my excel data from Picture 1 to Picture 2 in Power Bi:

 

Picture-1:

Picture1.png

 

Picture-2:

 

Picture2.png

 

Can someone please let me know if we can do this in Power Bi ?

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User
7 REPLIES 7
Ahmedx
Super User
Super User

Thank you so much for this solution.

Ahmedx
Super User
Super User

Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.

https://1drv.ms/u/s!AiUZ0Ws7G26RiwWpHuNsZ0oo7fZH?e=DmU6f4

excel-file:

https://1drv.ms/x/s!AiUZ0Ws7G26RiwTlYBTSKKXPH40P?e=dlCG75

Ahmedx
Super User
Super User

pls try this

let
    Source = Excel.Workbook(File.Contents("C:\Users\User\Desktop\Data Transformation in Power Bi.xlsx"), null, true),
    data_Sheet = Source{[Item="data",Kind="Sheet"]}[Data],
    #"Promoted Headers" = Table.PromoteHeaders(data_Sheet, [PromoteAllScalars=true]),
    #"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{{"Project Name", type text}, {"Qty", Int64.Type}, {"Cat", type text}, {"Dispatch Date", type any}, {"FAT Date", type any}}),
    #"Filled Down" = Table.FillDown(#"Changed Type",{"Project Name", "Qty"}),
    #"Unpivoted Other Columns" = Table.UnpivotOtherColumns(#"Filled Down", {"Project Name", "Qty", "Cat"}, "Attribute", "Value"),
    #"Merged Columns" = Table.CombineColumns(#"Unpivoted Other Columns",{"Attribute", "Cat"},Combiner.CombineTextByDelimiter("_", QuoteStyle.None),"Merged"),
    #"Pivoted Column" = Table.Pivot(#"Merged Columns", List.Distinct(#"Merged Columns"[Merged]), "Merged", "Value")
in
    #"Pivoted Column"
lucadelicio
Super User
Super User

lucadelicio_1-1696670668196.png


Go the tranform data in power query section and use the standard function Fill - Down.
It will replace the null value of your column with the previous not null value.
Then import the data in the model with save and load button.

MARK AS A SOLUTION IF I HELP YOU TO RESOLVE YOUR PROBLEM.


Regards

Luca D'Elicio

 



Luca D'Elicio

LinkedIn Profile
lucadelicio
Super User
Super User

Hi can you share your excel file?
You can use wetranfer to share the file
https://wetransfer.com/
Thank you



Luca D'Elicio

LinkedIn Profile

Hi, Below is the link for excel file:

 

https://we.tl/t-a5uFivF5rN

 

Thanks.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors