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
padinator
Helper I
Helper I

Save subtotal in measure and use as dynamic multiplier

Hello all, to illustrate my issue i would like to show the following screenshot

As you see i have basically 3 categories of costs which is Picking (here i add up any cost except my storage costs) and the other 2 dimensions are costs for storage&unmoved storage cost.

Long story short, i am desperately looking for a way to dynamically save the cost amounts for (Storage & Unmoved) in some kind of measure which is then used to be multiplied by the corresponding "Spread" in any line. It is important to understand that this is just one block of many within my pivot table, which means i have about 100 blocs of Picking | Storage & Unmoved sums, while for any of these blocs i need to find a way to dynamically store its corresponding amount for Storage in a variable which is then used within the lines above to multiply the spread with it.

 

padinator_1-1643899514321.png

 

Any help or hint is highly appreciated!

Thanks !

 

3 REPLIES 3
v-shex-msft
Community Support
Community Support

Hi @padinator,

Can you please share a pbix or some dummy data that keep raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

@padinator , check if measure like this can help

 

calculate(sum(table[COST]), filter(allselected(Table[Category]), Table[Category] in {"Storage","Unmoved"} ) )

 

or

 

calculate(sum(table[COST]), filter(all(Table[Category]), Table[Category] in {"Storage","Unmoved"} ) )

Wll unfortunately it does not work. Idk why but generally it does not seem that any of the formulas gets even accepted. I get an #ERROR in nearly any formula i am trying to use. I should mention that i use PowerPivot and not PowerBI , but regarding the syntax this should not make a difference?

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.

Top Solution Authors