Forum Discussion

TSales's avatar
TSales
Regular Visitor
2 years ago
Solved

YTD Calculation Blank Values

Hello,

 

I am trying to create a year to date calculation, but I find that it does not show anything in my Matrix visual when there is not a datapoint for a specific month.

 

-Have separate calendar table with a relationship to my data table that has all dates from Jan 1 to Dec 31.

-Simple data table has a Cost Center with monthly amounts that I want to create a YTD calculation for, with no data in the month of July 2023.

 

- YTD measure:

- June and August show correct current month and YTD amount:

 

- When I filter on July, it shows nothing:

I know it is probably a super easy fix to get the visual to show the YTD values for July, but I am a beginner to PowerBI and any help would be greatly appreciated.

  • Hi TSales,

     

    I re-created your data model and measures as best as I could from your description and don't have the issue you're describing. Can you please share your pbix? (If you don't know how, please see the pinned thread in the forum.)

     

     


    ----------------------------------
    If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

4 Replies

  • Wilson_'s avatar
    Wilson_
    Memorable Member

    Hi TSales,

     

    I re-created your data model and measures as best as I could from your description and don't have the issue you're describing. Can you please share your pbix? (If you don't know how, please see the pinned thread in the forum.)

     

     


    ----------------------------------
    If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

      • Wilson_'s avatar
        Wilson_
        Memorable Member

        TSales,

         

        Changing the cross filter direction to single instead of both fixes your issue.

         

        As you can see from my screenshots, the relationship between the two tables is not bi-directional. As a general rule, you should only use single direction relationships; your lookup/dimension tables should filter your fact tables only.


        ----------------------------------
        If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)