Forum Discussion
DAX Measure
- 4 years ago
Hi Anonymous
You need to use the selectedvalue DAX formula:
Mreasure 1 = VAR _A = SELECTEDVALUE ( 'Trade'['Reporter Country'] ) RETURN CALCULATE ( SUM ( 'Trade'[Value] ), FILTER ( ALL ( 'Trade' ), 'Trade'['Reporter Country'] = _A ) )Mreasure 2 = VAR _A = SELECTEDVALUE ( 'Trade'['Partner Country'] ) RETURN CALCULATE ( SUM ( 'Trade'[Value] ), FILTER ( ALL ( 'Trade' ), 'Trade'['Partner Country'] = _A ) )If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/ - Anonymous4 years ago
Hi Anonymous ,
measure =
CALCULATE (
SUM ( 'Trade'[Value] ),
FILTER (
ALLSELECTED ( 'Trade' ),
'Trade'[Reporter Country] = SELECTEDVALUE ( 'Reporter'[Reporter Country] )
&& 'Trade'[year] = SELECTEDVALUE ( 'year'[year] )
&& 'Trade'[product] = SELECTEDVALUE ( 'product'[product] )
)
)Or
measure =
CALCULATE (
SUM ( 'Trade'[Value] ),
FILTER (
ALL ( 'Trade' ),
'Trade'[Reporter Country] = SELECTEDVALUE ( 'Trade'[Reporter Country] )
&& 'Trade'[year] = SELECTEDVALUE ( 'Trade'[year] )
&& 'Trade'[product] = SELECTEDVALUE ( 'Trade'[product] )
)
)Best Regards,
Jay
Hi Anonymous
You need to use the selectedvalue DAX formula:
Mreasure 1 =
VAR _A =
SELECTEDVALUE ( 'Trade'['Reporter Country'] )
RETURN
CALCULATE (
SUM ( 'Trade'[Value] ),
FILTER ( ALL ( 'Trade' ), 'Trade'['Reporter Country'] = _A )
)
Mreasure 2 =
VAR _A =
SELECTEDVALUE ( 'Trade'['Partner Country'] )
RETURN
CALCULATE (
SUM ( 'Trade'[Value] ),
FILTER ( ALL ( 'Trade' ), 'Trade'['Partner Country'] = _A )
)
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/