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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

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.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

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.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.