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

Cumulative Totals to specific date

Hi There,

 

I am going crazy trying to figure out how to calculate a cumulative total up to a date (for example, today). I've been working with this metric but it still give me value up to the end of the year:

 

Incid Acum FY up today =
VAR LastDataEntry =
CALCULATE ( LASTDATE ( Incidencias[Date] ); ALL ( Incidencias ) )
RETURN
IF (
SELECTEDVALUE ( Calendario[Date] ) > LastDataEntry;
BLANK ();
CALCULATE (
[Incidencias];
FILTER (
ALLSELECTED ( Calendario );
Calendario[Date] <= MAX ( Calendario[Date] )
)
)
)
 
Any ideas? 
 
Muchas gracias 🙂
2 REPLIES 2
v-chuncz-msft
Community Support
Community Support

@Anonymous 

 

Make sure there is a relationship on Date column or change the DAX as follows.

            FILTER (
                ALLSELECTED ( Incidencias ),
                Incidencias[Date] <= MAX ( Calendario[Date] )
            )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-chuncz-msft 

Tables are properly connected and i have tried to modify the metric as you proposed but still is showing whole year instead of up to a given date.

I will keep on trying. Thanks anyway.

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.