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

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

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
1. Value11012
2. Value223
3. Value32025

 

Any help would be greatly apprecaited. 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ygangadhara 

You can refer to the following example

Sample data

vxinruzhumsft_0-1678415217278.png

And I put the fields to the matrix visual, and create a measure as value to put in matrix

 

 

Measure = var a=CALCULATE(SUM('Table'[Value]),OFFSET(-1,,ORDERBY('Table'[ValueType]),KEEP))
var b=CALCULATE(SUM('Table'[Value]),OFFSET(-2,,ORDERBY('Table'[ValueType]),KEEP))
return IF(SUM('Table'[Value])=BLANK(),DIVIDE(a,b)*100,SUM('Table'[Value]))

 

 

Output

vxinruzhumsft_1-1678415312921.png

 

Best Regards!

Yolo Zhu

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 

You can refer to the following example

Sample data

vxinruzhumsft_0-1678415217278.png

And I put the fields to the matrix visual, and create a measure as value to put in matrix

 

 

Measure = var a=CALCULATE(SUM('Table'[Value]),OFFSET(-1,,ORDERBY('Table'[ValueType]),KEEP))
var b=CALCULATE(SUM('Table'[Value]),OFFSET(-2,,ORDERBY('Table'[ValueType]),KEEP))
return IF(SUM('Table'[Value])=BLANK(),DIVIDE(a,b)*100,SUM('Table'[Value]))

 

 

Output

vxinruzhumsft_1-1678415312921.png

 

Best Regards!

Yolo Zhu

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

 

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

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.