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
JoséVP
New Member

Medida con error

saludo!!

 

Esperando que se encuentren bien, tengo un problema con una formula (la función max solo acepta una referencia de columna como argumento).

 

AAP 2021 Acum = CALCULATE([IAAP],
FILTER(ALLSELECTED('Tabla Calendario 2'[Fecha]),
MONTH('Tabla Calendario 2'[Fecha])<=MAX(MONTH('Tabla Calendario 2'[Fecha])) && YEAR('Tabla Calendario 2'[Fecha])<=MAX(YEAR('Tabla Calendario 2'[Fecha]))))
1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

HI @JoséVP,

It seems like you want a yearly cumulative calculation on your measure formulas, right? If that is the case, you can try to use the following measure formula:

AAP 2021 Acum =
VAR currdate =
    MAX ( 'Tabla Calendario 2'[Fecha] )
RETURN
    CALCULATE (
        [IAAP],
        FILTER (
            ALLSELECTED ( 'Tabla Calendario 2'[Fecha] ),
            YEAR ( 'Tabla Calendario 2'[Fecha] ) = YEAR ( currdate )
                && 'Tabla Calendario 2'[Fecha] <= currdate
        )
    )

If the above does not help, please share some more detial to help us clarify your scenario and test:

How to Get Your Question Answered Quickly  

Regards,

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

2 REPLIES 2
v-shex-msft
Community Support
Community Support

HI @JoséVP,

It seems like you want a yearly cumulative calculation on your measure formulas, right? If that is the case, you can try to use the following measure formula:

AAP 2021 Acum =
VAR currdate =
    MAX ( 'Tabla Calendario 2'[Fecha] )
RETURN
    CALCULATE (
        [IAAP],
        FILTER (
            ALLSELECTED ( 'Tabla Calendario 2'[Fecha] ),
            YEAR ( 'Tabla Calendario 2'[Fecha] ) = YEAR ( currdate )
                && 'Tabla Calendario 2'[Fecha] <= currdate
        )
    )

If the above does not help, please share some more detial to help us clarify your scenario and test:

How to Get Your Question Answered Quickly  

Regards,

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

@JoséVP , Assuming PSA is measure a new measures

 

Cumulative = CALCULATE([PSA],
FILTER(ALLSELECTED('Calendar Table 2'),'Calendar Table 2'[Date] <= max('Calendar Table 2'[Date])))

 

 

 

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.