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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

6 Meses anteriores al mes

Tengo una tabla de errores que tiene dos campos principales: entorno y fecha de creación. Necesito obtener el número total de errores por medio ambiente para los últimos 6 meses para cada mes. Probé muchas soluciones que encontré en línea, pero nada parecía funcionar.

Actualmente tengo múltiples medidas que calculan el número de errores por entorno por mes, así es como se ven:

Errores de producción: COUNTROWS(FILTER(Bugs, Bugs[env] á "Production" && Bugs[createdDate] á Bugs[createdDate]))+0
Tengo la sensación de que estoy haciendo esto mucho más complicado de lo que tiene que ser, pero no puedo conseguir que funcione. Soy relativamente nuevo en Power BI y DAX, aunque sí conozco los conceptos básicos.
1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hola @malletman,

Puede intentar utilizar la siguiente fórmula de medida si cumple con sus requisitos:

Production Bugs =
VAR currDate =
    MAX ( Bugs[createdDate] )
RETURN
    COUNTROWS (
        FILTER (
            ALLSELECTED ( Bugs ),
            Bugs[env] = "Production"
                && Bugs[createdDate]
                    >= DATE ( YEAR ( currDate ), MONTH ( currDate ) - 6, DAY ( currDate ) )
                && Bugs[createdDate] <= currDate
        )
    ) + 0

saludos

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hola

Comparta algunos datos y muestre el resultado esperado.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
v-shex-msft
Community Support
Community Support

Hola @malletman,

Puede intentar utilizar la siguiente fórmula de medida si cumple con sus requisitos:

Production Bugs =
VAR currDate =
    MAX ( Bugs[createdDate] )
RETURN
    COUNTROWS (
        FILTER (
            ALLSELECTED ( Bugs ),
            Bugs[env] = "Production"
                && Bugs[createdDate]
                    >= DATE ( YEAR ( currDate ), MONTH ( currDate ) - 6, DAY ( currDate ) )
                && Bugs[createdDate] <= currDate
        )
    ) + 0

saludos

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

Anonymous
Not applicable

Necesito los datos reales, ya que necesito usarlos para otros cálculos. Así que tendría que ser una medida, creo.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.