Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I'm trying to create a Measure that gives SUM of MINs under 2 different geography levels, but I couldn't sort it out after many attempts.
This is my table and data example
| Geo1 | Geo2 | Category | Component | Qty |
| A | A1 | CAT1 | Comp1 | 1 |
| A | A1 | CAT1 | Comp2 | 2 |
| A | A1 | CAT2 | Comp1 | 3 |
| A | A1 | CAT2 | Comp2 | 4 |
| A | A2 | CAT1 | Comp1 | 5 |
| A | A2 | CAT1 | Comp2 | 6 |
| A | A2 | CAT2 | Comp1 | 7 |
| A | A2 | CAT2 | Comp2 | 8 |
This is the desired Measure output for 2 different configurations:
First Case:
| Geo1 | Category | Result Measure Desired |
| A | CAT1 | 6 |
| A | CAT2 | 10 |
I expect this result because:
For Geo1 = A, Category = CAT1,
Sum(Comp1)=6, Sum(Comp2)=8
Min(6,8) = 6
Second case:
| Geo1 | Geo2 | Category | Result Measure Desired |
| A | A1 | CAT1 | 1 |
| A | A1 | CAT2 | 3 |
| A | A2 | CAT1 | 5 |
| A | A1 | CAT2 | 7 |
I expect this result because:
For Geo1 = A, Geo2 = A1, Category = CAT1,
Sum(Comp1)=1, Sum(Comp2)=2
Min(1,2) = 1
For Geo1 = A, Geo2 = A2, Category = CAT1,
Sum(Comp1)=5, Sum(Comp2)=6
Min(5,6) = 5
Basically what I'm trying to do is to check at Geo1 Level and Category what's the minimum number of components available, and from there define the category result.
If I add Geo2, I pretend to have this measure reconstructed to recalculate the equation at that level.
In a practical example, if for Geo1 = US, CAT1 = PC, I have COMP1 = SCREEN, COMP2 = KEYBOARD, the minimum number of available PCs in US is equal to the minimum of SCREENs and KEYBOARDs in US, independently if they are in different cities. But I want to check the quantities of PCs that I have in Geo2 = New York City, the number would be the minimum of components in that city only. Hope it makes sense ![]()
I tried this option without any logic result:
Measure =
SUMX (
VALUES ('Table'[Category]),
(
CALCULATE(
MINX(
SUMMARIZE('Table','Table'[Geo1],'Table'[Category],'Table'[Component],"XX",
SUM('Table'[Qty]))
,[XX])))
)And this one:
Measure2 = MINX(
SUMMARIZE('Table','Table'[Geo1],'Table'[Category],'Table'[Component],"XX",
SUM('Table'[Qty]))
,[XX])This last one works ok if I have Geo2 level, but if I remove it, the result is not recalculating at Geo1
I would appreciate some help.
Thanks and regards,
Pablo
What about something like this:
Min Measure =
CALCULATE(
MINX(
ADDCOLUMNS(
SUMMARIZE(
Table1,
Table1[Category],
Table1[Geo1],
Table1[Component]
),
"Min",
CALCULATE(
SUM( Table1[Qty])
)
),
[Min]
)
)Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 98 | |
| 72 | |
| 50 | |
| 50 | |
| 44 |