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
jordanesqu
Frequent Visitor

Subtotal of single items instead of calculated formula in a table

Hi All,

I calculated VolPriceMix which work on a single item but then subtotal display also a calculated result instead of sum of particular items.

I calculated Volume as a Delta Quantity * Avg Price Previous year

Vol_ = [∆ HL Ist]*[AVG Price VJ]

Then I tried to sum those single items using HASONEVALUE but I noticed that in case of no Quantity in current year(THL Ist) formula does not return a value in some cases.
Vol = IF(HASONEVALUE(PBI_JC[Product.]); [Vol_]; SUMX(VALUES(PBI_JC[Product.]); [Vol_]))

Could you advise how to solve this problem or another way how to get to the subtotal?

Thanks 

PMV_Subtotal.JPG

3 REPLIES 3
amitchandak
Super User
Super User

@jordanesqu , what is issue this alone is giving

SUMX(VALUES(PBI_JC[Product.]); [Vol_])

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak 

I would like the Total to be calculated as a sum of single items not as a formula. For example Price is calculated as:

Price = IF(AND([Qty CY]<>0;[Qty LY]=0);0;[Qty CY]*[Delta Rev/Qty]),
which calculate for the total as 3.034,62(Qty CY)*9,94(Delta Rev/Qty) = 30.166,42

 I would like however the total for Price to be the sum of Price effects of single Products:

0,00+(-348,25)+10.801,66+7.125,11+39,66+15.914,08+4.823,49+(-1.560,46)+27.357,17+26.444,96 = 90.597,42

Below the screen shots  (I do not see the option to attach PBIx if you know how to do this please let me lnow and I share) 

 

PMV_Subtotal3.JPGPMV_Subtotal4.JPG

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Greg_Deckler
Community Champion
Community Champion

@jordanesqu Maybe try ISINSCOPE instead?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

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.