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
Syndicate_Admin
Administrator
Administrator

Cálculo (Suma) cuando se utiliza una segmentación entre fechas: Calcular solo entre valores

Hola

Quiero mostrar el valor total de un mes mediante la segmentación de datos entre segmentación de datos.
Sin embargo, cuando intento hacer que sea más fácil para el usuario para que el usuario pueda seleccionar desde el primero del mes el 1 del segundo mes me da el total de ambos meses.

Between slicer example.jpg

¿Alguna idea para cambiar de medida o tengo que cambiar mi enfoque?

Usaré la misma página para insertar SAMEPERIODASLATYEAR y añadir una tarjeta KPI.

Muchas gracias.

Rgds,

Niel

2 ACCEPTED SOLUTIONS
AllisonKennedy
Super User
Super User

¿Solo quieres que seleccionen un solo mes? Si es así, sugiero usar una segmentación de mes, con el mes de la tabla DimDate si tiene una:
https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

View solution in original post

amitchandak
Super User
Super User

@niel_orvyn1 , Trate de tener tabla de fechas separada Intente

medida :
var _max á eomonth(maxx(allselected(Date),Table[Date]),0)
var _min á eomonth(minx(allselected(Date),Table[Date]),-1)+1

devolución
calculate(sum(Tbale[value]),filter(all(Table[Date]), Table[Date] >-_min && Table[Fecha] <-_max))


medida :
var _max á eomonth(maxx(allselected(Date),Table[Date]),0)
var _min á eomonth(minx(allselected(Date),Table[Date]),-1)+1

devolución
calculate(sum(Tbale[value]),filter(all(Date[Date]), Date[Date] >-_min && Table[Date] <-_max))

Así que el tiempo esto puede agrupar los datos en pocas fechas. si eso sucede, consulte este video

https://www.youtube.com/watch?v=duMSovyosXE

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@niel_orvyn1 , Trate de tener tabla de fechas separada Intente

medida :
var _max á eomonth(maxx(allselected(Date),Table[Date]),0)
var _min á eomonth(minx(allselected(Date),Table[Date]),-1)+1

devolución
calculate(sum(Tbale[value]),filter(all(Table[Date]), Table[Date] >-_min && Table[Fecha] <-_max))


medida :
var _max á eomonth(maxx(allselected(Date),Table[Date]),0)
var _min á eomonth(minx(allselected(Date),Table[Date]),-1)+1

devolución
calculate(sum(Tbale[value]),filter(all(Date[Date]), Date[Date] >-_min && Table[Date] <-_max))

Así que el tiempo esto puede agrupar los datos en pocas fechas. si eso sucede, consulte este video

https://www.youtube.com/watch?v=duMSovyosXE

AllisonKennedy
Super User
Super User

¿Solo quieres que seleccionen un solo mes? Si es así, sugiero usar una segmentación de mes, con el mes de la tabla DimDate si tiene una:
https://excelwithallison.blogspot.com/2020/04/dimdate-what-why-and-how.html

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

@AllisonKennedy y @amitchandak

Muchas gracias por sus respuestas y ayuda. Agregar una tabla dimdate resolvió mi problema, anteriormente estaba usando la fecha de la tabla original😞

Saludos

Niel

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.