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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors
Top Kudoed Authors