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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
vicsinc
Frequent Visitor

Showing latest month only values in chart

Hi

 

I have a table that shows 2 metrics by brand by month over a 12 month period.

 

I want to create a chart that only shows the most recent month's 2 metrics by brand.

 

I am struggling with the DAX - I tried to calculate the Latest Date but it doesn't like it because I have multipe rows with the same date?

 

So in the example below, I only want me chart to display Feb figures.

 

Any help would be apprecaited. Thank you.

 

Victoria

 

BrandMonthCategoryTotal
Brand101/01/2022Type1140
Brand101/01/2022Type2120
Brand201/01/2022Type193
Brand201/01/2022Type277
Brand101/02/2022Type1180
Brand101/02/2022Type2157
Brand201/02/2022Type198
Brand201/02/2022Type287
    
1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @vicsinc 

 

You can try the following methods.

Measure:

Measure =
IF (
    SELECTEDVALUE ( Market[Month] )
        = CALCULATE ( LASTDATE ( Market[Month] ), ALLSELECTED ( Market ) ),
    1,
    0
)

Put measure into the filter of the view and set it equal to 1.

vzhangti_0-1649733321237.pngvzhangti_1-1649733361148.png

https://docs.microsoft.com/dax/lastdate-function-dax 

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi, @vicsinc 

 

You can try the following methods.

Measure:

Measure =
IF (
    SELECTEDVALUE ( Market[Month] )
        = CALCULATE ( LASTDATE ( Market[Month] ), ALLSELECTED ( Market ) ),
    1,
    0
)

Put measure into the filter of the view and set it equal to 1.

vzhangti_0-1649733321237.pngvzhangti_1-1649733361148.png

https://docs.microsoft.com/dax/lastdate-function-dax 

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

vicsinc
Frequent Visitor

To add,

 

I thought maybe I could do it as a summarise but it errors. This is what I tried:

 

Market Summarised =
SUMMARIZE (
    'Market',
    'Market'[Brand],
    'Market'[Category],
    "Counts",
        CALCULATE (
            MAX ( 'Market'[Count] ),
            FILTER ( 'Market', 'Market'[Month] = MAX ( 'Market'[Month] ) )
        )
)

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.