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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
RustyD
Frequent Visitor

Sum values from different columns and keep aggregated result

hi

I have a simple measure inside 1 table:

column A minus column B and it works fine on high level of aggregation. 

 

RustyD_2-1725612716928.png

 

But the problem is that when I add more columns where some rows contains empty cells, the lines are split and the same happens with the calculation:

RustyD_1-1725612690916.png

 

My expected result would be to get all lines 0 in this example.

 

thanks for any hints. 

1 ACCEPTED SOLUTION
uzuntasgokberk
Super User
Super User

Hello @RustyD,

You can change the measure like this,

pbisup=
IF(
ISBLANK(SELECTEDVALUE(Tablesil1[B])) ||
ISBLANK(SELECTEDVALUE(Tablesil1[P])),
0,
SUM(Tablesil1[B])-SUM(Tablesil1[P])
)

Kind Regards,
Gökberk Uzuntaş

📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!

🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |




View solution in original post

4 REPLIES 4
Anonymous
Not applicable

Hi,

Based on the description, if you have solved the problem, please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Wisdom Wu

RustyD
Frequent Visitor

hi @uzuntasgokberk 

thanks for this hint,  

 

By the way the columns PO qty and GR qty are also measures.  So I simplified and omit the SELECTEDVALUE and it looks like only the IF with ISBLANK works : 

 

Measure =
IF(
ISBLANK([PO qty]) || 
ISBLANK([GR qty)]),
0,
[PO qty)]-[GR qty)]
)

Hello @RustyD ,

 

Great it has worked! Happy to hear that.

 

Kind Regards,
Gökberk Uzuntaş

📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!

🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |

 

uzuntasgokberk
Super User
Super User

Hello @RustyD,

You can change the measure like this,

pbisup=
IF(
ISBLANK(SELECTEDVALUE(Tablesil1[B])) ||
ISBLANK(SELECTEDVALUE(Tablesil1[P])),
0,
SUM(Tablesil1[B])-SUM(Tablesil1[P])
)

Kind Regards,
Gökberk Uzuntaş

📌 If this post helps, then please consider Accepting it as a solution and giving Kudos — it helps other members find answers faster!

🔗 Stay Connected:
📘 Medium |
📺 YouTube |
💼 LinkedIn |
📷 Instagram |
🐦 X |
👽 Reddit |
🌐 Website |
🎵 TikTok |




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.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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