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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Subtracting Value

Hi Team,

 

I have data,

screen.PNG

 

expected Remaining value,

 

screen_II.PNG

 

Thanks,

KV's

14 REPLIES 14
Anonymous
Not applicable

Hi @V-lianl-msft ,

 

The below formula is perfect for me, but the only problem is it works only if these data comes from the same table but my data are from different tables, 

which is Table A contains (UID, Cat)
Table B contains (Prod_Stock, Prod_Vol)
if I club these two table's the desired result is not achieved therefore please find some other solution.

 

Thanks,

KV's

Hi @Anonymous ,

 

It is very difficult to analyze without looking at the data and just by imagining.

Again,DAX measure are based on row context so any given value from slicers, filters, interactions with other visualizations, variables, relationships and so on can influence your result.

Refer this blog to provide your sample data.

https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216 

Please remove any sensitive data before uploading.

 

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

V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

 

Refer to:

Measure = 
var total_ = CALCULATE(SUM('Table'[Qas(m)]),ALLEXCEPT('Table','Table'[size]))
return total_-MAX('Table'[Limit])

V-lianl-msft_0-1608017799701.png

 

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

Anonymous
Not applicable

Hi @V-lianl-msft ,

 

thanks for your reply,

 

suppose Qas (m) and Limit is calculated column like new measure's then how do I calculate ?

 

please help me.

Hi @Anonymous ,

 

If there is no sample file to view the measure details, there may be deviation.

Please try:

Measure = 
var total = SUMX(ALLEXCEPT('Table','Table'[Size]),[Measure(Qas)])
return total-[Measure(limit)]

If the problem persists,could you share the sample pbix via cloud service like onedrive for business?

Please remove any sensitive data before uploading.

 

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

Anonymous
Not applicable

data look like below, please update me (can't share pbi file)

screen.PNG

Hi @Anonymous ,

 

Be aware that DAX measure are based on row context so any given value from slicers, filters, interactions with other visualizations, variables, relationships and so on can influence your result.

Please paste the data in the form of a table, and provide the two measures involved in the screenshot. It will make me more clear about your scenaio.

Please remove any sensitive data before uploading.

https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216 

 

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

Anonymous
Not applicable

again I'm sorry , I can't paste file, please see below screenshot,

screen_III.PNG

 

Hi @Anonymous ,

 

Please refer to:

V-lianl-msft_0-1608088282963.png

Measure = 
VAR x = 
SUMX(
    FILTER( ALLSELECTED(Sheet7), [UID] = MAX([UID]) ),
    [Prod_Vol]
)
RETURN
[Prod_Stock]- x

Sample .pbix 

 

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

Anonymous
Not applicable

Hi @V-lianl-msft ,

 

Thanks for you help,

 

But [Prod_Vol] and [Prod_Stock] is separate table like Measures table. 

Thanks,

KV's

Hi @Anonymous ,

 

Sorry, I can't understand what you're saying.

 

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

PhilipTreacy
Super User
Super User

@Anonymous 

Not very clear.  In oder to get your qs answered quickly please supply as much information as possible, provide sample data in a table that can be copied, or in a file - not only as screenshots, and be clear in your explanation.

Where is this data stored?  Excel Tables?  Database?  Data model?

Do you want a solution in Power Query or DAX?

Is this the extent of the data or just a sample?

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


PhilipTreacy
Super User
Super User

HI @Anonymous 

I'm not following the logic.  How do you get the final table from the starting table?

Isn't the sum of z1 = 9.8 x 2 and sum of  Z2 = 11.5 x 4?

Phil



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

@PhilipTreacy 

 

Please review above screenshot , (Output Data) (Remaining Value)

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