Forum Discussion

Dom87326's avatar
Dom87326
Icon for Helper II rankHelper II
5 years ago
Solved

SAMEPERIODLASTYEAR with empty last year dates

Hello, 

 

I'm having a problem with SAMEPERIODLASTYEAR, when the data is not fully loaded it seems to show wrong cumulative amount. 

 

Is there any other way rather than setting page level filter on filter pane to exclude current year month's from dax formula that doesn't have last year's comparison?

DAX: 
Sameperiodlastyear = CALCUALTE ( [Total Sales], SAMEPERIODLASTYEAR ( DimDate [Date] ) )

 

Many thanks in advance!

 



  • Hey Dom87326 ,

     

    can you show which filter contexts are affecting the visual by hovering over the small filter icon like that:

     

    For me it looks like there is a filter from October on and that's the reason the visuals shows only 7'664 instead of 37'516. Same for the total.

    As an alternative, would it be possible to share the file? Then I can take a look.

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
     
    Best regards
    Denis
     

1 Reply

  • selimovd's avatar
    selimovd
    Icon for Most Valuable Professional rankMost Valuable Professional

    Hey Dom87326 ,

     

    can you show which filter contexts are affecting the visual by hovering over the small filter icon like that:

     

    For me it looks like there is a filter from October on and that's the reason the visuals shows only 7'664 instead of 37'516. Same for the total.

    As an alternative, would it be possible to share the file? Then I can take a look.

     

    If you need any help please let me know.
    If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
     
    Best regards
    Denis