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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Sofiya72
New Member

Summarise volume of group

Hi! 
Can someone help me with a measure for Power Query, that will show total volume for  stores, which sell current group of goods? 
 Here is an example of my row data: 

IMG_2427.png

 I count results manually. So I need DAX formula, that can summarise shops volumes for every fruit (but only in that shops where current fruit is selling).
For instance, in jan oranges were selling in shops A and C. So we need to get sum of total volumes in these shops in jan: 2 + 5 + 1 + 7 + 5 = 20. 

 

Than I plan to use measure in pivot table. 
I am new in Power Query, so sorry if I got mistakes. 

1 ACCEPTED SOLUTION
Dangar332
Super User
Super User

Hi, @Sofiya72 

try below measure code

result = 
var a = VALUES('Table'[shop])
var b = CALCULATE(
            SUM('Table'[volume]),
            'Table'[shop] in a,
            ALL('Table'[fruit])
        )
return
b

 

Dangar332_0-1709796391348.png

 

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! 

View solution in original post

3 REPLIES 3
Dangar332
Super User
Super User

Hi, @Sofiya72 

try below measure code

result = 
var a = VALUES('Table'[shop])
var b = CALCULATE(
            SUM('Table'[volume]),
            'Table'[shop] in a,
            ALL('Table'[fruit])
        )
return
b

 

Dangar332_0-1709796391348.png

 

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos !! 

qqqqqwwwweeerrr
Super User
Super User

Hi @Sofiya72 

 

I have taken a data format similar to you and this is how you can achieve it, you do not need to create any measure for that you use matrix visual for same.

qqqqqwwwweeerrr_0-1709732813058.png

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Check for more intersing solution here: https://www.youtube.com/@letssolveproblem

Regards

Hi! I see you summarise total volume by SKU, by check my results table: I need to summarise total volume by store, that sell each SKU. 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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