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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Asantos2020
Advocate II
Advocate II

Multiplying DAX Measure by Column on a bar chart to have the total balance

Hello,

 

I have a DAX measure, giving me the qty balance on a bar chart (date on X axis) and filtered on Product basis:

SaldoMovimento = IFERROR(CALCULATE(SUM(BI_Estoque_Movimentacao[Quantidade]);FILTER(ALL('Calendário'[Date]);'Calendário'[Date]<=MAX('Calendário'[Date])));BLANK()) 

I now need to have a column stating this balance in $. I have a Unit Cost column, Unit Cost as a DAX Measure, but I can't find a way to find the right result.

 

Thanks in advance for your help!

 

Cheers,

Antonio 

 

 

 

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi @Asantos2020 

You may try to use SUMX Function instead of SUM in the formula, please refer to these blog:

https://exceleratorbi.com.au/use-sum-vs-sumx/

https://powerpivotpro.com/2014/10/sum-sumx-or-calculatechoices-choices/

If not your case, please share some sample pbix file and your expected output.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Regards,

Lin

Community Support Team _ Lin
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

2 REPLIES 2
v-lili6-msft
Community Support
Community Support

hi @Asantos2020 

You may try to use SUMX Function instead of SUM in the formula, please refer to these blog:

https://exceleratorbi.com.au/use-sum-vs-sumx/

https://powerpivotpro.com/2014/10/sum-sumx-or-calculatechoices-choices/

If not your case, please share some sample pbix file and your expected output.

https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 

Regards,

Lin

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

Hello @v-lili6-msft ,

 

Thanks for the heads-up.

When I was putting together the data to provide you with a file, I figured that the same calculation I used for having Inventory Balance in Qty worked for values. I then saw that the data made available contains inconsistencies value wise.

 

Cheers,

Antonio Santos

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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