This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
Hola, estoy tratando de crear una tarjeta que muestre la diferencia en ACV entre la fecha MAX y la fecha MIN. Esto está vinculado a un filtro de fecha en un gráfico de barras, por lo que cuando el usuario cambia años en el gráfico, la tarjeta reflejará el cambio $ en ACV y % de cambio (es decir, para otra tarjeta más adelante) para el nuevo rango de años. Por lo tanto, una simple calque de resta entre el primer año y el año pasado seleccionado es lo que estoy buscando para el cambio $.
Sin embargo, ¡no puedo hacer que funcione! Aquí están los datos de muestra con los que estoy trabajando:
| año | Categoría de producto | Acv |
| 2011 | A | $131,282.70 |
| 2012 | A | $1,397,633.70 |
| 2013 | A | $2,472,531.60 |
| 2014 | A | $4,010,372.20 |
| 2015 | A | $5,295,672.70 |
| 2016 | A | $6,553,524.60 |
Tengo una mesa de citas en su lugar. Intenté varias cosas publicadas antes, pero no estoy llegando a ninguna parte. Por ejemplo, estoy intentando restar el ACV de 2012 del ACV para 2014 para mostrar el cambio total en el tiempo (por lo que no contar 2013). No estoy recibiendo el valor correcto de aproximadamente $2.6m
Solved! Go to Solution.
Trate como
measure =
var _max = maxx('Date','Date'[Date])
var _min = Minx('Date','Date'[Date])
return
CALCULATE(SUM(Table[ACV]), FILTER(all('Date'), 'Date'[Date] =_max)) -CALCULATE(SUM(Table[ACV]), FILTER(all('Date'), 'Date'[Date] =_min))
/////////////////////////////////Or
measure =
var _max = maxx('Date','Date'[Date])
var _min = Minx('Date','Date'[Date])
return
CALCULATE(SUM(Table[ACV]), FILTER(all('Date'), year('Date'[Date]) =year(_max))) -CALCULATE(SUM(Table[ACV]), FILTER(all('Date'), year('Date'[Date]) =year(_min)))
hola @cbtekrony
Puede probar la lógica como se muestra a continuación:
Measure =
var _minyear=MIN('Table'[Year])
var _maxyear=MAX('Table'[Year])
return
CALCULATE(SUM('Table'[ACV]),FILTER(ALLEXCEPT('Table','Table'[Product Category]),'Table'[Year]=_maxyear))-CALCULATE(SUM('Table'[ACV]),FILTER(ALLEXCEPT('Table','Table'[Product Category]),'Table'[Year]=_minyear))Measure 2 =
var _minyear=MIN('Table'[Year])
var _maxyear=MAX('Table'[Year])
return
CALCULATE(SUM('Table'[ACV]),FILTER('Table','Table'[Year]=_maxyear))-CALCULATE(SUM('Table'[ACV]),FILTER('Table','Table'[Year]=_minyear))
Resultado:
saludos
Lin
Mira si esto funciona: https://community.powerbi.com/t5/Quick-Measures-Gallery/Lookup-Min-Max/td-p/985814
Trate como
measure =
var _max = maxx('Date','Date'[Date])
var _min = Minx('Date','Date'[Date])
return
CALCULATE(SUM(Table[ACV]), FILTER(all('Date'), 'Date'[Date] =_max)) -CALCULATE(SUM(Table[ACV]), FILTER(all('Date'), 'Date'[Date] =_min))
/////////////////////////////////Or
measure =
var _max = maxx('Date','Date'[Date])
var _min = Minx('Date','Date'[Date])
return
CALCULATE(SUM(Table[ACV]), FILTER(all('Date'), year('Date'[Date]) =year(_max))) -CALCULATE(SUM(Table[ACV]), FILTER(all('Date'), year('Date'[Date]) =year(_min)))
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.