Forum Discussion

RyPCy's avatar
RyPCy
New Member
3 years ago
Solved

Total Sales by Month Not Calculating Properly after First 2 Months...

Hi Everyone! 

I've recently begun building quite a few dashboards in Power BI (More familiar with Tableau) and I have a unique issue that I can't seem to understand. Hoping the collective mind can help!

 

Goal: Show the total sales for each month in 2023 thus far. i.e. Jan = $34000, Feb =$56999, March = $98777 etc...

Format/Function: Using the DatesBetween DAX Function to sum the totals for each month like so.. 

****Feb Balance = CALCULATE(SUM('Table_1[Sales]),
DATESBETWEEN('Table_1'[Date], DATE(2023,02, 01), DATE(2023,02,28)))*****
 
Problem: When I use this formula on March I get a wildly high number... and the same goes for any month following that number... However when I pull the data in SQL it's accurate and the SQL query is connected properly to this Power BI Dashboard. 
 
Can anyone help with this issue?
  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi RyPCy ,

    It sounds like there may be an issue with the data or the DAX formula being used. One possible solution is to check the data for any outliers or errors that may be causing the issue. Additionally, you may want to try using a different DAX formula to calculate the total sales for each month, such as the TOTALYTD function.

     

     

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Rongtie

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

     

     

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi RyPCy ,

    It sounds like there may be an issue with the data or the DAX formula being used. One possible solution is to check the data for any outliers or errors that may be causing the issue. Additionally, you may want to try using a different DAX formula to calculate the total sales for each month, such as the TOTALYTD function.

     

     

    How to Get Your Question Answered Quickly 

     

    If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

     

    Best Regards
    Community Support Team _ Rongtie

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

     

     

    • RyPCy's avatar
      RyPCy
      New Member

      Thank you for replying! 

      It was an error in how the data was being pulled in. 

      I was able to troubleshoot and fix it 🙂