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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Syndicate_Admin
Administrator
Administrator

Problema de filtro: el filtro no funciona

Hola

Estoy tratando de obtener # de tiendas en nuestra pipleline para el próximo mes que tienen un ingreso mensual estimado de 2K o más.

A continuación se muestra el Dax:

prueba = DÓNDE _medate=Valor seleccionado(dimDate[Fecha].[Fecha])
DÓNDE _numberofmonth=1
devolución
calcular(suma(«Informe cerrado de la CE» [# de tejados]),
RELACIÓN DE USO(«EC Closed Report» [Exp Revenue Month Date],dimDate[Date]),

FECHAAÑADIR(dimDate[Fecha].[Fecha],+1,MES),
FILTRO(
«Informe cerrado de la CE»,
calcular([Rev cerrada]>=2000))
)
Sin el filtro, calcula el # correcto de tiendas, pero una vez que agrego el filtro, no aparece nada.
Incluso intenté esto, pero también volvió a sintonizar un espacio en blanco:
prueba = DÓNDE _medate=Valor seleccionado(dimDate[Fecha].[Fecha])
Dónde _numberofmonth=1
devolución
calcular(suma(«Informe cerrado de la CE» [# de tejados]),
RELACIÓN DE USO(«EC Closed Report» [Exp Revenue Month Date],dimDate[Date]),

FECHAAÑADIR(dimDate[Fecha].[Fecha],+1,MES),
FILTRO(
«Informe cerrado de la CE»,
( «Informe cerrado CE» [Fecha del mes de ingresos por experiencia]>=2000))
)
¿Alguna idea sobre cuál podría ser el problema?
Gracias
3 REPLIES 3
Syndicate_Admin
Administrator
Administrator

Try 1:

Test = 
VAR _medate = selectedvalue(dimDate[Date])
VAR _numberofmonth = 1
RETURN 
     CALCULATE ( 
         SUM ('EC Closed Report'[# of Rooftops]),
         FILTER( ALL('EC Closed Report'), [Closed Rev] >= 2000),
         USERELATIONSHIP('EC Closed Report'[Exp Revenue Month Date], dimDate[Date])
         --,
         -- Not sure what this is doing here?
         -- DATEADD(dimDate[Date].[Date],+1,MONTH)
)

Vea si esta parte de DAX funciona ...

Sin la fecha agregada funciona, pero devuelve las tiendas con ingresos esperados en noviembre, y necesito ingresos esperados para diciembre, por lo que tuve el DateAdd. Intenté poner el DateAdd después del filtro, pero eso tampoco funcionó.

-- Try 2: 
Test =  
VAR _medate = selectedvalue('EC Closed Report'[Exp Revenue Month Date]) 
RETURN 
     CALCULATE ( 
         SUM ('EC Closed Report'[# of Rooftops]),
         USERELATIONSHIP('EC Closed Report'[Exp Revenue Month Date], dimDate[Date]),
         FILTER( ALL('EC Closed Report'), [Closed Rev] >= 2000),
         DATESMTD(DATEADD(dimDate[Date], 1, MONTH))  
)

Prueba opcional 2.a.: Para ver el intervalo de fechas que deseaba:

Period Dates =
-- FYI, this is more for testing, not for calculating your measure
-- Create a table visual with 'EC Closed Report'[Exp Revenue Month Date] and Period Dates Measure and check the values

VAR _medate = selectedvalue('EC Closed Report'[Exp Revenue Month Date]) 
VAR _numberofmonth = 1  
var _nextmonth = IF ( _selDate = Blank(), 
                  EOMONTH(Minx(all('EC Closed Report'[Exp Revenue Month Date]), 'EC Closed Report'[Exp Revenue Month Date]), 1),
                  EOMONTH(_selDate, 1)
                 )
var _nextmonth_StartDate =  Date(Year(_nextmonth), Month(_nextmonth), 1)
VAR _nextmonth_EndDate =  _nextmonth
 
RETURN _nextmonth_StartDate & " : " & _nextmonth_EndDate
 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.

Top Kudoed Authors