Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Chart data not resembling table data. Please help!

Hi there,

I created a measure to display actuals (if date is prior to todays date/past) and predicted values (post today/future). These values are showing as intended in a table visual (below). But when I use the measure on my combo chart (to represent the bars) these only map correctly up until today. All predicted values (although present in the table column) are wrong.

Please help. This chart uses the one measure created, which operates perfectly fine in the table. See totals on chart for comparisons.

 

 

 

 

 

3 Replies

  • AllisonKennedy's avatar
    AllisonKennedy
    Community Champion

    Anonymous  We need a lot more info please. What is the DAX for your measure currently? What does the raw data model look like?

     

    The reason it works in the table but not in the chart is that you have a different CONTEXT in both. What's in the legend of your chart? Add this to your table and you'll see it doesn't work anymore. You need to troubleshoot how that column filters the value you're displaying in the measure. Hope that helps? If you provide us with more details we can be more specific.

  • Anonymous's avatar
    Anonymous
    Not applicable

    AllisonKennedy Thank you for your response.

     

    Measure used: 

    Actuals and Forecast =
    VAR LastActualDate =
    CALCULATE(
    MAX('Process Improvement Tracker'[Date]),
    REMOVEFILTERS()
    )
    VAR Result =
    IF(
    MAX('FTE Year Roadmap'[Date]) < TODAY(),
    'Process Improvement Tracker'[Cumulative Deployed Saving],
    'FTE Year Roadmap'[Year Estimate Cumulative Savings]
    )
    RETURN
    Result
     
    The legend of my chart includes Cohort.
    • AllisonKennedy's avatar
      AllisonKennedy
      Community Champion

      Anonymous  How are Process Improvement Tracker and FTE Year Roadmap related?

       

      It looks like Cumulative Deployed Savings and Year Estimate Cumulative Savings are both measures??? If so, what's the DAX for them too please?

       

      What table is Cohort in?

       

      I think a SUMX will likely solve your problem, but need more info to be certain.

       

      For example: 

       

      Actuals and Forecast =
      VAR LastActualDate =
      CALCULATE(
      MAX('Process Improvement Tracker'[Date]),
      REMOVEFILTERS()
      )
      VAR Result =
      SUMX( 'Process Improvement Tracker',
      IF(
      MAX('FTE Year Roadmap'[Date]) < TODAY(),
      'Process Improvement Tracker'[Cumulative Deployed Saving],
      'FTE Year Roadmap'[Year Estimate Cumulative Savings]
      )
      )
      RETURN
      Result