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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Rene83A1
Frequent Visitor

Subtraction of different rows and columns

Hi,

I have a table with date, team, cluster, KPI and the values.

I would like to subtract the values from column KPI 3 with column KPI 2, but the values should be assigned to the respective date, team and cluster.

 

 

DateTeamClusterKPIKPI 1KPI 2KPI 3KPI 4KPI 5KPI 6
2022_01Team1Cluster1KPI 11412     
2022_01Team1Cluster1KPI 2 171    
2022_01Team1Cluster1KPI 3  209   
2022_01Team1Cluster1KPI 4   0,851983  
2022_01Team1Cluster1KPI 5    0,12110482 
2022_01Team1Cluster1KPI 6     0,148017
2022_01Team2Cluster1KPI 11412     
2022_01Team2Cluster1KPI 2 171    
2022_01Team2Cluster1KPI 3  209   
2022_01Team2Cluster1KPI 4   0,851983  
2022_01Team2Cluster1KPI 5    0,12110482 
2022_01Team2Cluster1KPI 6     0,148017
2022_01Team1Cluster2KPI 11412     
2022_01Team1Cluster2KPI 2 171    
2022_01Team1Cluster2KPI 3  209   
2022_01Team1Cluster2KPI 4   0,851983  
2022_01Team1Cluster2KPI 5    0,12110482 
2022_01Team1Cluster2KPI 6     0,148017
2022_01Team2Cluster2KPI 11412     
2022_01Team2Cluster2KPI 2 171    
2022_01Team2Cluster2KPI 3  209   
2022_01Team2Cluster2KPI 4   0,851983  
2022_01Team2Cluster2KPI 5    0,12110482 
2022_01Team2Cluster2KPI 6     0,148017

 

The result should be a new KPI

2022_01Team1Cluster1KPI NEW38

 

Thank you beforehand.

1 ACCEPTED SOLUTION
Yossarian
Helper I
Helper I

Hi,

 

It seems tricky to organize the table as you want: you would need to have aditional rows to your original table with "KPI new" label. You coud do this:

 
CALCULATE([meas kpi 3] - [meas kpi 2], ALL(Table[KPI]))

This will give you the answer for all the rows in table but it won't show as additional lines. Moreover you'd need to work with some if statement to show the result only on the lines you'd want.

View solution in original post

3 REPLIES 3
Yossarian
Helper I
Helper I

Hi,

 

It seems tricky to organize the table as you want: you would need to have aditional rows to your original table with "KPI new" label. You coud do this:

 
CALCULATE([meas kpi 3] - [meas kpi 2], ALL(Table[KPI]))

This will give you the answer for all the rows in table but it won't show as additional lines. Moreover you'd need to work with some if statement to show the result only on the lines you'd want.
Yossarian
Helper I
Helper I

Hi,

 

Why do you have KPI rows and KPI columns?
If you just unpivot your data first, maybe a simple matrix visual will do the trick...

 

Hope it helps.

Hi,

 

the original table looks like this

VK TeamClusterKPI2022_362022_352022_34
Team1Cluster1KPI1102025
Team1Cluster1KPI250552
Team1Cluster1KPI3152519
Team1Cluster1KPI4100,0%100,0%100,0%
Team1Cluster1KPI50,00%0,00%0,00%
Team1Cluster1KPI60,00%0,00%0,00%

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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 Kudoed Authors