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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register 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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors