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
ayoubb
Helper IV
Helper IV

calcular en período perticular

Hola, espero que lo estés haciendo bien,

Por favor, necesito añadir a este DAX: de 20/07/2020 16:06:57 a 26/07/2020 16:06:57 lo que significa calcular únicamente los datos del 20/07/2020 16:06:57 al 26/07/2020 16:06:57, por favor, ¿cómo puedo hacerlo

Rasgo de entrada - CALCULATE(
DISTINCTCOUNT (en lo que «ventas»),
'ventas'[tipo] EN "clio", "dacia", "renault"
)
2 REPLIES 2
AntrikshSharma
Community Champion
Community Champion

Ticket traité =
VAR ConstTime =
    TIME ( 16, 06, 57 )
VAR StartDate =
    DATE ( 2020, 07, 20 ) + ConstTime
VAR EndDate = StartDate + 6
VAR DatesWithinCriteria =
    FILTER ( ALL ( Dates ), Dates[Date] >= StartDate && Dates[Date] <= EndDate )
VAR Result =
    CALCULATE (
        DISTINCTCOUNT ( 'sales'[N° demande de service] ),
        'sales'[type] IN { "clio", "dacia", "renault" },
        DatesWithinCriteria
    )
RETURN
    Result
amitchandak
Super User
Super User

@ayoubb ,

tratar como

Rasgo de entrada - CALCULATE(
DISTINCTCOUNT('sales'[No demande de service]),
'ventas'[tipo] EN "clio", "dacia", "renault",
'ventas'[fecha] >- fecha(2020 ,07,20) + tiempo(16,6,57),
'ventas'[fecha] <- fecha(2020 ,07,26) + tiempo(16,6,57)
))

O

Rasgo de entrada - CALCULATE(
DISTINCTCOUNT('sales'[No demande de service]),
filter('sales', 'sales'[type] IN'"clio", "dacia", "renault" &&
'ventas'[fecha] >- fecha(2020 ,07,20) + tiempo(16,6,57) &&
'ventas'[fecha] <- fecha(2020 ,07,26) + tiempo(16,6,57)
))

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.