Forum Discussion

5599jeeteh's avatar
5599jeeteh
Regular Visitor
1 year ago

Cumulative bar line chart

Hi There,

Im having issues with the Cumulative Actual  Installation counts (bar chart-Y axis) versus Cumulative Forecast Installation counts(line chart) in Power BI using Running Sum(Quick Measure) 

 

In Power BI, for the month of Feb, the count is 10 but in a separate tabulated Excel sheet its 7.  The difference is also for the following months ie 14 in Power BI and 10 in Excel sheet

You can see the difference in manual cumulative calculation for Cumulative Actual Installation when tabulated separately in Excel table 

 

As per below Power BI Line Bar chart, can see that Im having issues with the Actual cumulative Installation counts (bar chart) versus Forecast Cumulative Installation counts (line chart).Forecast Cumulative Installation counts (line chart) is correctly plotted while Actual Cumulative Installation is not on monthly basis

 

Please assist on this using the below table

 

Project NameLocation Forecast Monthly  InstallationActual  Monthly Installation 
JavaUS30-Jan-2530-Jan-25
JavaJapan30-Jan-2530-Jan-25
JavaChina30-Jan-2530-Jan-25
JavaIndonesoa30-Jan-2530-Jan-25
JavaMalaysia30-Jan-2530-Jan-25
JavaSingapore28-Feb-2528-Feb-25
VolcanoThailand28-Feb-2528-Feb-25
VolcanoVietnam28-Feb-2530-Mar-25
VolcanoCanada28-Feb-2530-Mar-25
VolcanoFrance28-Feb-2530-Mar-25
VolcanoItaly30-Mar-2528-Apr-25
VolcanoGermany30-Mar-2528-Apr-25
BAUBrazil30-Mar-2528-Apr-25
BAUKenya30-Mar-2528-Apr-25

 

 

Manual Calculation in Excel

 

 

 

 

 

 

Forecast Monthly InstallationCumulative Forecast InstallationActual Monthly InstallationCumulative Actual Installation
Jan5555
Feb51027
March414310
April014414

4 Replies

  • I created a table with your data as well as a date dimension table. I then have an active relationship between the date in my dim table and actuals in your fact table. I created an inactive relationship from the date dim to forecast in your fact.

     

    Then, I created a few measures:

    RowCount = COUNTROWS('Table')
    RowCount running total in Date Actuals =
    CALCULATE(
        [RowCount],
        FILTER(
            ALLSELECTED('DateDim'[Date]),
            ISONORAFTER('DateDim'[Date], MAX('DateDim'[Date]), DESC)
        )
    )
     
    RowCount running total in Date Forecast =
    CALCULATE(
        [RowCount],
        FILTER(
            ALLSELECTED('DateDim'[Date]),
            ISONORAFTER('DateDim'[Date], MAX('DateDim'[Date]), DESC)
        ),
        USERELATIONSHIP('Table'[Forecast Monthly  Installation], 'DateDim'[Date])
    )
     
    When I create the chart, I put month from my date dimension in the x-axis, (I am filtered to 2025 in the filter pane), and I have the two running total measures in: actuals is in columns and forecast is in line.
     

     

    • 5599jeeteh's avatar
      5599jeeteh
      Regular Visitor

      Hi Audrey,

       

      Could you please email me the .pbix file 

      [email protected] 

       

      Tried couple of times. Need to see where I'm getting it wrong 

  • Hi! Are you using a date table? If yes, what are your relationships? 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi 5599jeeteh ,

     


    Did audreygerred reply solve your problem? If so, please mark it as the correct solution, and point out if the problem persists.

     

    Best regards,

    Adamk Kong