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
jrobles
Regular Visitor

SUMAR CON FILTROS

Hola,

 

necesito realizar unas sumas con filtros, pero no logro dar con el detalle, lo necesario es sumar segun competidor y a eso sumar toda la venta de los campos vacios, quedando de la siguiente manera  en el campo Venta total

 

COMPETENCIAVENTAVENTA TOTAL
COMPETIDOR 11001330
COMPETIDOR 12301330
COMPETIDOR 21001150
COMPETIDOR 2501150
VACIO10002000
VACIO10002000

 

lo intente con la funcion calculate, pero el resultado es "infinito"

 

REP1 = 

CALCULATE(

SUM(DATA[VENTA]),
FILTER(DATA, DATA[COMPETENCIA]=(DATA[COMPETENCIA])&&DATA[COMPETENCIA]=BLANK()
))
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@jrobles , expected output is not clear.

 

But a new column 

 

REP1 = 

CALCULATE(

SUM(DATA[VENTA]),
FILTER(DATA, DATA[COMPETENCIA]=earlier(DATA[COMPETENCIA]) && isblank(DATA[COMPETENCIA])
))
 
A measure like 

CALCULATE(

SUM(DATA[VENTA]),
FILTER(allselected(DATA), DATA[COMPETENCIA]=max(DATA[COMPETENCIA]) && isblank(DATA[COMPETENCIA])
))

View solution in original post

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

Hi @jrobles ,

 

I'm not sure about the results you expect. Please describe the expected results based on the data you provide in more detail.


Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@jrobles , expected output is not clear.

 

But a new column 

 

REP1 = 

CALCULATE(

SUM(DATA[VENTA]),
FILTER(DATA, DATA[COMPETENCIA]=earlier(DATA[COMPETENCIA]) && isblank(DATA[COMPETENCIA])
))
 
A measure like 

CALCULATE(

SUM(DATA[VENTA]),
FILTER(allselected(DATA), DATA[COMPETENCIA]=max(DATA[COMPETENCIA]) && isblank(DATA[COMPETENCIA])
))

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.