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
gpl
Frequent Visitor

Si cualquiera de las columnas de campo de fecha, entonces el recuento distinto para ese día

Hey chicos esperan que todos puedan ayudar

Tengo una tabla que tiene una fecha de recogida, fecha de entrega y un número de unidad. Estoy tratando de hacer un recuento distinto en el número de unidad por fecha si la fecha de recogida o la fecha de entrega cae en ese día

IE Pickup 6/1/2020 Entrega 6/2/2020 Unidad R100 Me gustaría que R100 contara para 6/1/2020 y de nuevo para 6/2/2020

¡Esperemos que esto tenga sentido! ¡Realmente aprecio la ayuda!

Gracias

1 ACCEPTED SOLUTION
mahoneypat
Employee
Employee

Por favor, pruebe este enfoque para su expresión

Units with OR =
VAR __thisdate =
    SELECTEDVALUE ( 'Date'[Date] )
RETURN
    CALCULATE (
        DISTINCTCOUNT ( Table[Unit] ),
        FILTER (
            Table,
            Table[DeliveryDate] = __thisdate
                || Table[PickupDate] = __thisdate
        )
    )

Si esto funciona para usted, márquelo como la solución. Los elogios también son apreciados. Por favor, avísame si no.

saludos

palmadita





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@gpl , debe crear una tabla de fechas común y unir ambas fechas con esa. Una unión activará una estará inactiva. Puede hacer uso de userelation para elegir la unión.

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

En caso de que necesite ambas fechas para trabajar en diferentes intervalos de tiempo, puede usarlas como filtros.

mahoneypat
Employee
Employee

Por favor, pruebe este enfoque para su expresión

Units with OR =
VAR __thisdate =
    SELECTEDVALUE ( 'Date'[Date] )
RETURN
    CALCULATE (
        DISTINCTCOUNT ( Table[Unit] ),
        FILTER (
            Table,
            Table[DeliveryDate] = __thisdate
                || Table[PickupDate] = __thisdate
        )
    )

Si esto funciona para usted, márquelo como la solución. Los elogios también son apreciados. Por favor, avísame si no.

saludos

palmadita





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


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.