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
annamakarova
New Member

After filtering in A choose min sales per ID in B and summarize them

Hello!
I have dataset with product IDs, competitors and sales.
In Power BI I need to make like "dynamic recalculation" after user choose competitors.

annamakarova_0-1623888220568.png

1. User choose competitors (a & c);

2. Need to find minimum sales per IDs (for ID 1 it will be 12, for ID 2 - 2);

3. Then summarize found sales (12 + 2).


The problem is that I understand how  to do it for constant dataset (for all competitors) with SQL, Python, but how to make it recalculated depends on competitor's choose?

Appreciate any help, as I am newcomer in Power BI world...

 

Anna

1 ACCEPTED SOLUTION

Hi, @annamakarova 

Please check the below.

 

Picture1.png

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi, @annamakarova 

Please check the below picture and the sample pbix file's link down below.

 

Picture2.png

 

Result Measure =
VAR groupbyIDtable =
GROUPBY (
ALLSELECTED ( Data ),
Data[ID],
"@minsales",
MINX (
CURRENTGROUP (),
Data[sales]
)
)
RETURN
SUMX (
groupbyIDtable,
[@minsales]
)
 
 
 
 
 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Dear @Jihwan_Kim , thanks a lot!

But how to make it works for different categories?
So in Result Measure there is total sum of minimum sales per ID is shown for category A, B, C separately?

annamakarova_0-1623912507527.png

 

Hi, @annamakarova 

Please check the below.

 

Picture1.png

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


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