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
Anonymous
Not applicable

Power BI DAX

Fecha de la fecha ?
ADDCOLUMNS (
CALENDARIO (FECHA(2010,1,1), FECHA(2050,12,31)),
"DateAsInteger", FORMAT ( [Fecha], "AAAAMMDD" ),
"Año", Año ([Fecha]),
"Quarter", "Q" & FORMAT ( [Fecha], "Q" ),
"YearQuarter", FORMAT ( [Fecha], "AAAA" ) & "/Q" & FORMAT ( [Fecha], "Q" )
)
StartDate - CALCULATE(MIN('Date'[Date]),ALLSELECTED('Date'[Date]))
EndDate - CALCULATE(MAX('Date'[Date]),ALLSELECTED('Date'[Date]))
Recuento de aplicaciones ?
VAR _Count - CALCULATE(
COUNT(
'App'[app_id]),
FILTER('App',
SI(
Y(
'App'[start_date_time] > [StartDate],
'App'[end_date_time] <- [EndDate]
),
1,
0
)
)
)
RETURN IF(ISBLANK(_Count),0,_Count)
Cuando selecciono la fecha entre 15-aug-2020 y 15-aug-2020 en date slicer , entonces mi número de aplicaciones está dando cero.
¿Alguna ayuda.??
3 REPLIES 3
amitchandak
Super User
Super User

@mvarun01, me parece bien al principio parece que.

Recuento de aplicaciones ?
var _StartDate - CALCULATE(MIN('Date'[Date]),ALLSELECTED('Date'[Date]))
vare _EndDate - CALCULATE(MAX('Date'[Date]),ALLSELECTED('Date'[Date]))
devolver CALCULATE(
COUNT(
'App'[app_id]),
FILTER('App',
'App'[start_date_time] >- _StartDate,
'App'[end_date_time] <- _EndDate
)
)

Si no funcionara. ¿Puede compartir datos de ejemplo y salida de ejemplo en formato de tabla?

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
Anonymous
Not applicable

@amitchandak - Gracias por la ayuda, se consiguió resolver i estaba frente a ese problema debido a datetime.

@mvarun01 - ¡Me alegro de que lo tengas!


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

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!

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