Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Issue with distinct Sum on Line and Column Stacked Chart

I have a Line and Column Stacked Chart (x-axis: Type, column y-axis: count, line y-axis: amount)  with a slicer (date).

Count is calculated DISTINCTCOUNT(Query1[id])

Amount is a calculated CALCULATE(SUM(Query1[amount]),ALLEXCEPT(Query1,Query1[id], Query1[Type]))

 

Issue is the line axis (amount) does not change with slicer (date). It remains the total amount regardless of which period selected on slicer. Is my formula or missing some parameters?

 

Thank you

  • Is your [Date] is also in your Query table? This should be avoided if possible.

    But in this case you could just add it you your ALLEXCEPT exceptions.

    CALCULATE(SUM(Query1[amount]),ALLEXCEPT(Query1,Query1[id], Query1[Type],Query1[Date]))

2 Replies

  • PVO3's avatar
    PVO3
    Icon for Impactful Individual rankImpactful Individual

    Is your [Date] is also in your Query table? This should be avoided if possible.

    But in this case you could just add it you your ALLEXCEPT exceptions.

    CALCULATE(SUM(Query1[amount]),ALLEXCEPT(Query1,Query1[id], Query1[Type],Query1[Date]))

    • Anonymous's avatar
      Anonymous
      Not applicable

      Great. That seem to fix the issue.