March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I want to calculate the total of measure 'Available Stock M²' (see below for DAX formula). On Article level (Artikelnummer) the calculation is fine but on Total level I want a different result --> the sum of all available stock m² per article
For Example: for Item Number BELL2020/010010/100 I have 18756 Physical Stock M² and 9000 Open Orders M², so available stock is 9756 sqm. For Item Number DIY1GAAS/001001/160 I have 91006 Physical Stock M² and 2736 Open Orders M², so available stock is 88270 sqm. For 2 item numbers I already have 98026 m² of available stock in total. However, on Total level I only have 58725 m² of available stock. Can someone help me with the result I want to achieve?
Thanks!
Solved! Go to Solution.
Hi @DM_95 ,
This is related with context since you are using a IF syntax.
Try to add the following measure:
Available Stock Final = SUMX( VALUES(Table[Artikelnummer]), [Available Stock M²])
This is a new measure that you can use on your matrix.
Check this article for a better explanation:
https://www.sqlbi.com/articles/why-power-bi-totals-might-seem-inaccurate/
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @DM_95 ,
As @MFelix said it's the measure context. You can try my method so that you can get the correct value at the article level and also at the total level.
Create the result measure based on the [Available stock m].
result =
var _b = SUMMARIZE('table','table'[artikenumber],"aaa",'table'[Available stock m])
return
IF(HASONEVALUE('table'[artikenumber]),[Available stock m],SUMX(_b,[aaa]))
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @DM_95 ,
As @MFelix said it's the measure context. You can try my method so that you can get the correct value at the article level and also at the total level.
Create the result measure based on the [Available stock m].
result =
var _b = SUMMARIZE('table','table'[artikenumber],"aaa",'table'[Available stock m])
return
IF(HASONEVALUE('table'[artikenumber]),[Available stock m],SUMX(_b,[aaa]))
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .
Best Regards
Community Support Team _ Rongtie
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @DM_95 ,
This is related with context since you are using a IF syntax.
Try to add the following measure:
Available Stock Final = SUMX( VALUES(Table[Artikelnummer]), [Available Stock M²])
This is a new measure that you can use on your matrix.
Check this article for a better explanation:
https://www.sqlbi.com/articles/why-power-bi-totals-might-seem-inaccurate/
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsMarch 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
146 | |
97 | |
79 | |
69 |