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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
cvalarcon
Helper I
Helper I

interaccion con filtros

Hola comunidad,

Tengo un problema con la interaccion de rangos de una tabla para ver en un gráfico.

cvalarcon_0-1673865431999.png

 

Tengo esta tabla que tiene tres columnas "fechas", "ValorAvg" y "Instrumentos"

Tengo 2 slicers uno para los valores y otro para la fecha

cvalarcon_1-1673865645064.png  

cvalarcon_2-1673865660046.png

 

El tema q tengo q mostrar en un mismo gráfico aquellos valores q estan dentro del rango de valores (seleccionados en el slicers) y aquellos mayores a este valor (en el ejemplo > a 2,88).
Ademas tener una linea de maximo q marque el maximo seleccionado en el rango dinamicamente de manera de poder ver los instrumentos que sobrepasen este maximo.

 

cvalarcon_3-1673865834609.png

La idea es tener un grafico como este pero con el maximo q se mueva dinamicamente y q muestre los valores dentro del rango junto con los valores q estan afuera del rango y q sean mayores al maximo.

 

Desde ya gracias

 

3 REPLIES 3
v-rzhou-msft
Community Support
Community Support

Hi @cvalarcon ,

 

I think you need to create an unrelated value table for slicer by What if Parameter.

RicoZhou_0-1673946267542.png

Measure:

Measure = 
VAR _Valor = CALCULATE(SUM('Table'[ValorAvg]))
RETURN
IF(_Valor>=[RangeMin],_Valor,BLANK())

My Sample:

RicoZhou_1-1673946323730.png

Result is as below.

RicoZhou_2-1673946367738.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.

Hi Rico,

Thanks for your response
I did it this but the problem here is that I have 3 range :
green : instruments < rang min 

yellow : rang min > instruments <= rang max
red : instruments > rang max
So I already have the amount of each # of instrumnet in each reange (as you can see in the pictures)

 

cvalarcon_0-1673957534714.png

Instrumets GYR = 
 
VAR _FCSgmG1 =
CALCULATE(
    DISTINCTCOUNT(vTablaReconciliacion_FINAL[Instrumento]),
        ALL('vRango MinMax Reconciliacion'[ValorSgm]),
        vTablaReconciliacion_FINAL[TipoSgm]="Sgm" && vTablaReconciliacion_FINAL[Categoria]="FC" &&
        vTablaReconciliacion_FINAL[ValorSgm]<=MIN('vRango MinMax Reconciliacion'[ValorSgm])
)

VAR _FCSgmY1 =
CALCULATE(
    DISTINCTCOUNT(vTablaReconciliacion_FINAL[Instrumento]),
        ALL('vRango MinMax Reconciliacion'[ValorSgm]),
        vTablaReconciliacion_FINAL[TipoSgm]="Sgm" && vTablaReconciliacion_FINAL[Categoria]="FC" &&
        vTablaReconciliacion_FINAL[ValorSgm]>MIN('vRango MinMax Reconciliacion'[ValorSgm]) && vTablaReconciliacion_FINAL[ValorSgm]<= MAX('vRango MinMax Reconciliacion'[ValorSgm])
)

VAR _FCSgmR1 =
CALCULATE(
    DISTINCTCOUNT(vTablaReconciliacion_FINAL[Instrumento]),
        ALL('vRango MinMax Reconciliacion'[ValorSgm]),
        vTablaReconciliacion_FINAL[TipoSgm]="Sgm" && vTablaReconciliacion_FINAL[Categoria]="FC" &&
        vTablaReconciliacion_FINAL[ValorSgm]> MAX('vRango MinMax Reconciliacion'[ValorSgm])
)

VAR _FCSgmG = 
IF(
    ISBLANK(_FCSgmG1),"-",_FCSgmG1
)
    
VAR _FCSgmY = 
IF(
    ISBLANK(_FCSgmY1),"-",_FCSgmY1
)

VAR _FCSgmR = 
IF(
    ISBLANK(_FCSgmR1),"-",_FCSgmR1
)

RETURN 

_FCSgmG &UNICHAR(10) &
_FCSgmY &UNICHAR(10) &
_FCSgmR &UNICHAR(10)

Now I need to create a line chart with all instrument inside the yellow and red range. 

So the MAX line in the chart should be the max value selected in the slicer and should be the max ValorAvg in order to see the # instrm outside the range (above max line).

So we need to see the selected values (date , yellow range and values > max range selected (red range))

 

cvalarcon_1-1673957995355.png

 

I hope I was clear.

Thanks 

Carlos

amitchandak
Super User
Super User

@cvalarcon , Not very clear, But assume you have measure M1

 

You need a measure like

 

new measure =
var _max = maxx(allselected(Param),Param[Date])
var _min = minx(allselected(Param),Param[Date])
return
if([M1]>= _min && [M1]<=_max, [M1], Blank())

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.