Forum Discussion

esuing's avatar
esuing
Icon for Helper I rankHelper I
3 years ago

Issue with previous month and current month data

This is frustrating me and I've spun my wheels long enough on it, so now I'm coming for help.

 

I have a simple report where the user selects the current month and I have a table that should show current month vs previous months for a value.  It works fine when the current month has a value, but if there isn't a value for the current month for a given "Ship To", then it won't display the Ship To and consequently, won't show the previous value if there is one. Here is a look at the report:

 

 

What you don't see here is the missing records where there was an FSC Dollars value in 7/1/22 for other Ship Tos, but because there was no value for 8/1/22, it's been dropped from the table. Here are my measures:

 

FSC Dollars = CALCULATE(SUM('Invoice Conditions'[Cond Dollars]),'Invoice Conditions'[Cond Type] IN {"Y826","Y806"})
FSC Prev Month Dollars = CALCULATE(SUM('Invoice Conditions'[Cond Dollars]),'Invoice Conditions'[Cond Type] IN {"Y826","Y806"},PREVIOUSMONTH('Invoice Headers'[Period Start Date]))
 
I feel like I maybe need to use an ALL or ALLEXCEPT somewhere in one of my measures, but I'm not sure. Any help would be great!
 
Thanks.
Eric
 

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi esuing ,

     

    Try to click one of your fields, and select the option "Show items with no data".  

    And then your items with no data will display.

    Reference: Show items with no data in Power BI - Power BI | Microsoft Learn

     

     

     

    Best Regards,

    Stephen Tao

     

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

     

    • esuing's avatar
      esuing
      Icon for Helper I rankHelper I

      Thanks for the reply. Unfortunately, this did not resolve the issue.

       

      Thanks.

      Eric