Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

How to display the latest value in the matrix column totals ?

Hello everybody, 


I am having the requirement to dispaly the latest value in the row totals. The data is a non-additive measure. It is customer snapshots, so the taks is to display the count of active customers per month, but if the whole year is filtered - meaning from Jan to Dec and we have data only up until July, the total should show the July's data


Filter min date - 1st of Jan 

Filter max date - 31st of Dec



I have this data: 



I need to display this:






The measure I am using is the follwing:

Customers :=
    SUM ( fact_table[col] ),
    FILTER ( dim_table, dim_table[col] = "Yes" ),
    FILTER (
        ALL ( fact_table[date] ),
        CONTAINS ( VALUES ( dim_time[date] ), dim_time[date], fact_table[date] )

I would be grateful of anyone can help.


Best regards, 



Hi @vasilsabev


You may try to use MAX Function to get the latest date. Here is the reference for you.


Latest =
    SUM ( Table1[values] ),
    FILTER ( Table1, MONTH ( Table1[date] ) = MONTH ( MAX ( Table1[date] ) ) )





Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Even if I enable the time relation, any idea how should this be done with 





Thanks for the answer. Unfortunatelly this measure works only when there is a physical relationship with the time dimension. 


In this model I am using a virtual one (


Any idea how would it work with virtual relation to the time ? 


If I do it like you said I get only the last month in the table.

Helpful resources

PBI Sept Update Carousel

Power BI September 2023 Update

Take a look at the September 2023 Power BI update to learn more.

Learn Live

Learn Live: Event Series

Join Microsoft Reactor and learn from developers.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

MPPC 2023 PBI Carousel

Power Platform Conference-Power BI and Fabric Sessions

Join us Oct 1 - 6 in Las Vegas for the Microsoft Power Platform Conference.

Top Solution Authors