0

i need your help calculating following: based on the region and value(left table), i need to calculate the number of minium values displayed. For instance, Value 5 is the minium value 3 times. Which function allow me to get that, i'm not able to find a right answer for days. any idea is welcome! many thanks

See data as example

Rb O
  • 1
  • 1

1 Answers1

1

Use the following DAX measure to achieve your goal:

CountMinValue= 
  VAR __value = SELECTEDVALUE( 'Table'[Value] )
  Return CALCULATE( COUNT( 'Table'[Min Value]), 'Table'[Min Value] = __value )

enter image description here

Agustin Palacios
  • 1,111
  • 6
  • 10
  • Many thanks agustin for your help. Considering i dont have Min Value calculate It, i'll calculate It separatelly and call It from your sentence. Is that a good approach? – Rb O Aug 01 '20 at 15:31
  • I thougt that you already have that column calculated. Use the following DAX code to create that column: Min Value = VAR __country = 'Table'[Country] VAR __subTable = FILTER( 'Table', 'Table'[Country] = __country ) Return CALCULATE( MIN( 'Table'[Value] ), __subTable ) – Agustin Palacios Aug 01 '20 at 15:39