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
I have two measures Rawqty used and raw material usedweight by warehouse. They work great when I have warehouse and Part_0 in each row. However I want to remove those field and only have Raw Material and RawMaterialUsedWeightbyWarehousepartcode measure showing.
Basically just a total of the Rawmaterialusedweightbywarehousepartcode column. Since teh qtyused is a measure that averages based on part_0 and warehouse, once these columns are removed my data calculates incorrrectly.
Solved! Go to Solution.
Ok I lied, I don't want to try to understand that formula. Can you try:
NewMeasure = SUMX(SUMMARIZE('Table', 'Table'[Warehouse], 'Table'[part_0], "num", [RawMaterialUsedweightbywarehousepartcode]), [num])
?
To retain the row context without explicitly showing the rows in the table, you can use one of the "X" functions. In your case, if you want to show the total, you would use SUMX and tell it to iterate over the Part # while calculating RawMaterialUsed...
See http://www.powerpivotpro.com/2010/02/sumx-the-5-point-palm-exploding-fxn-technique/ for more information. A relevant line from that post:
"The fields referenced in SUMX do NOT have to be present in your [table]...I like to think of it as a stack of invisible cells underneath each pivot cell that you can see, and SUMX is rolling up a lot of logic across those invisible cells to return a simple number to the top cell you can see."
Hi @Drobinson1
Can you share the sample data and the final output you desire.
CheenuSing
The screen shot in the orginal attachement had the sample data that has the correct amounts when broken out by warehouse and part_0.
I expect the result to be 67,344 which is the sum of the last column.
However when I remove Part_0 and ware house my totals change, due to measure qty used2 being a calculated average
The formulas you're currently using for the measures would be useful for understanding I think. Although conceptually, I think @chrisu is right about the solution.
Ok I lied, I don't want to try to understand that formula. Can you try:
NewMeasure = SUMX(SUMMARIZE('Table', 'Table'[Warehouse], 'Table'[part_0], "num", [RawMaterialUsedweightbywarehousepartcode]), [num])
?
Any thoughts on ignoring a customer filter using that example.
So in the example below we use 83,000,000 lbs of a product as a company. But when we select a specific customer it filters correctly to show that customer uses 108,969. I would like to have a second meaasure in that table that when a customer it still shows to total company usage. This way we can quickly say the customer uses 108,969 or the 83,000,000 lbs.
Just wrap the measure I gave above in a calculate with an ALL on the filter you'd like to ignore.
SecondMeasure = CALCULATE([NewMeasure], ALL('Table'[Customer]))
that doesnt seem to work. Everytime I select a customer I get a different "all" number for the same raw material.
I have also tryed using several different variations of all between the three tables still with no luck.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
User | Count |
---|---|
93 | |
90 | |
86 | |
76 | |
49 |
User | Count |
---|---|
166 | |
149 | |
99 | |
73 | |
57 |