cancel
Showing results for 
Search instead for 
Did you mean: 
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 IV
Super User IV

@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])
))


Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

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 IV
Super User IV

@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])
))


Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

View solution in original post

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Top Kudoed Authors