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
Daniel29195
Super User
Super User

paginated report - current row - previous row within matrix group

Hello , 

i searched everywhere. dut didnt find anything that could help. 

what im trying to achieve can be seen in the the excpected column : 

this calculate should be calculated as folow : 

current row's fact -  previous row's fact ( within each group ) .

so when you are on g2 - sg1 ,  it should return blank() and not 5 - 4  =1

 

 

Daniel29195_1-1719575744818.png

 

is it possible using paginated report expressions ? 

 

because, although you can use previous function. but i couldnt make it to be able to calculate the previous fact within each group .

 

 

sample data : 

group subgroup fact expected column
g1 sg1 1  
g1 sg2 2 1
g1 sg3 3 1
g1 sg4 4 1
g2 sg1 5  
g2 sg2 6 1
g2 sg3 7 1
g2 sg4 8 1

 

@lbendlin   @Greg_Deckler  

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Daniel29195 ,

Below is my table:

vxiandatmsft_0-1719796907769.png

The following Expression might work for you:

=IIf(Fields!subgroup.Value = "sg1" , " " , Fields!fact.Value - Previous(Fields!fact.Value))

The final output is shown in the following figure:

vxiandatmsft_1-1719796964449.png

Best Regards,

Xianda Tang

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 @Daniel29195 ,

Below is my table:

vxiandatmsft_0-1719796907769.png

The following Expression might work for you:

=IIf(Fields!subgroup.Value = "sg1" , " " , Fields!fact.Value - Previous(Fields!fact.Value))

The final output is shown in the following figure:

vxiandatmsft_1-1719796964449.png

Best Regards,

Xianda Tang

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

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 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