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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
verma_isha02
Frequent Visitor

Need help with DAX measure

HI All, I have a table like below in Power BI -

verma_isha02_1-1692025537756.png

 

I need help in creating DAX calculation where as an example for Germany, I would need -
Value in collumn B - MIN(Value in column b for the countries that appear) * c / 1(value in column A).
So result for germany should be 33627240 - 19029 * 496,1 / 1 = 16.673.033.477,1

 

Basically the value - the minimum value of that measure for another country * volume / weight is what I want.

I tried below, but its not giving right value and please guide on how to get the correct result.

Exposure value =
var a = [B] - MINX(ALL('Dim Country'[Country]), [B)
 var b = [C]
 var c = IF(a <> BLANK(), a * FIXED(b,1,1))
 var d =
  CALCULATE(MIN('Fact'[B]), ALLEXCEPT('Dim Country', 'Dim Country'[Country]))
 var e = DIVIDE(c,d,0)
return a
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi, @verma_isha02 ,

 

Here I create a sample to have a test.

vrzhoumsft_0-1692175167412.png

I think A/B/C may be measures.

Measure:

Measure = 
VAR _PART1 = [B]
VAR _1 =
    SUMMARIZE ( ALL ( 'Table' ), 'Table'[Country], "B", [B] )
VAR _2 =
    ADDCOLUMNS (
        _1,
        "MINVALUE",
            MINX ( FILTER ( _1, [B] < EARLIER ( [B] ) && [B] <> 0 ), [B] )
    )
VAR _PART2 =
    SUMX ( FILTER ( _2, [Country] = MAX ( 'Table'[Country] ) ), [MINVALUE] )
RETURN
    DIVIDE ( ( _PART1 - _PART2 ) * [C], [A] )

Result is as below.

vrzhoumsft_1-1692175217182.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi, @verma_isha02 ,

 

Here I create a sample to have a test.

vrzhoumsft_0-1692175167412.png

I think A/B/C may be measures.

Measure:

Measure = 
VAR _PART1 = [B]
VAR _1 =
    SUMMARIZE ( ALL ( 'Table' ), 'Table'[Country], "B", [B] )
VAR _2 =
    ADDCOLUMNS (
        _1,
        "MINVALUE",
            MINX ( FILTER ( _1, [B] < EARLIER ( [B] ) && [B] <> 0 ), [B] )
    )
VAR _PART2 =
    SUMX ( FILTER ( _2, [Country] = MAX ( 'Table'[Country] ) ), [MINVALUE] )
RETURN
    DIVIDE ( ( _PART1 - _PART2 ) * [C], [A] )

Result is as below.

vrzhoumsft_1-1692175217182.png

 

Best Regards,
Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.