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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
ygangadhara
New Member

Formulas two apply on Row Level

 

I'm hoping I can get a bit of help. I have data in two Rows need to calculate 3 rd row as mentioned below.

 

Value 1 & Value 2 are given 

Need to calculate Value3 = Value2/ Value1*100 for all the months

 

 JanFeb
VALUE11012
VALUE223
VALUE32025

 

 

Any help would be greatly apprecaited. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ygangadhara ,

I have created a simple smaple, please refer to it.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCnP0CXU1VNJRMjQAEUZKsTpQQSMgH4SNlWJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [value = _t, Jan = _t, Feb = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"value", type text}, {"Jan", Int64.Type}, {"Feb", Int64.Type}}),
    #"Demoted Headers" = Table.DemoteHeaders(#"Changed Type"),
    #"Changed Type1" = Table.TransformColumnTypes(#"Demoted Headers",{{"Column1", type text}, {"Column2", type any}, {"Column3", type any}}),
    #"Transposed Table" = Table.Transpose(#"Changed Type1"),
    #"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table", [PromoteAllScalars=true]),
    #"Changed Type2" = Table.TransformColumnTypes(#"Promoted Headers",{{"value", type text}, {"VALUE1", Int64.Type}, {"VALUE2", Int64.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type2", "Custom", each ([VALUE2]/[VALUE1])*100),
    #"Renamed Columns" = Table.RenameColumns(#"Added Custom",{{"Custom", "value 3"}}),
    #"Demoted Headers1" = Table.DemoteHeaders(#"Renamed Columns"),
    #"Changed Type3" = Table.TransformColumnTypes(#"Demoted Headers1",{{"Column1", type text}, {"Column2", type any}, {"Column3", type any}, {"Column4", type any}}),
    #"Transposed Table1" = Table.Transpose(#"Changed Type3"),
    #"Promoted Headers1" = Table.PromoteHeaders(#"Transposed Table1", [PromoteAllScalars=true]),
    #"Changed Type4" = Table.TransformColumnTypes(#"Promoted Headers1",{{"value", type text}, {"Jan", Int64.Type}, {"Feb", Int64.Type}})
in
    #"Changed Type4"

vpollymsft_0-1678761375927.png

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

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

1 REPLY 1
Anonymous
Not applicable

Hi @ygangadhara ,

I have created a simple smaple, please refer to it.

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCnP0CXU1VNJRMjQAEUZKsTpQQSMgH4SNlWJjAQ==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [value = _t, Jan = _t, Feb = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"value", type text}, {"Jan", Int64.Type}, {"Feb", Int64.Type}}),
    #"Demoted Headers" = Table.DemoteHeaders(#"Changed Type"),
    #"Changed Type1" = Table.TransformColumnTypes(#"Demoted Headers",{{"Column1", type text}, {"Column2", type any}, {"Column3", type any}}),
    #"Transposed Table" = Table.Transpose(#"Changed Type1"),
    #"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table", [PromoteAllScalars=true]),
    #"Changed Type2" = Table.TransformColumnTypes(#"Promoted Headers",{{"value", type text}, {"VALUE1", Int64.Type}, {"VALUE2", Int64.Type}}),
    #"Added Custom" = Table.AddColumn(#"Changed Type2", "Custom", each ([VALUE2]/[VALUE1])*100),
    #"Renamed Columns" = Table.RenameColumns(#"Added Custom",{{"Custom", "value 3"}}),
    #"Demoted Headers1" = Table.DemoteHeaders(#"Renamed Columns"),
    #"Changed Type3" = Table.TransformColumnTypes(#"Demoted Headers1",{{"Column1", type text}, {"Column2", type any}, {"Column3", type any}, {"Column4", type any}}),
    #"Transposed Table1" = Table.Transpose(#"Changed Type3"),
    #"Promoted Headers1" = Table.PromoteHeaders(#"Transposed Table1", [PromoteAllScalars=true]),
    #"Changed Type4" = Table.TransformColumnTypes(#"Promoted Headers1",{{"value", type text}, {"Jan", Int64.Type}, {"Feb", Int64.Type}})
in
    #"Changed Type4"

vpollymsft_0-1678761375927.png

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors