Forum Discussion
Data changing when adding legend
Please provide sanitized sample data that fully covers your issue.
I have given an example dataset shown below.
My goal is to make 2 charts. The first Chart would be a column chart. X-axis would have the [week_num_date] and the Y-axis would have the Cumulative Total (aka Running Total of distinct login), which I created a measure.
Running Total =
CALCULATE (
DISTINCTCOUNT('Table2'[NewLogin]),
'Table2'[Week_Num_Date]<= MAX('Table2'[Week_Num_Date]))
The next chart would also be a similar column chart, but to show a legend of [EMP_DEPT_NM]. When I add this legend the overall distinct count changes and unable to show similar values as Chart 1.
| NewLogin | EMP_DEPT_NM | Week_Num_Date |
| B4714 | Branch Operations | 5/22/21 |
| B7788 | Branch Operations | 5/22/21 |
| C3553 | Lending | 5/22/21 |
| C1254 | Lending | 5/22/21 |
| A9948 | President/CEO''s Office | 5/29/21 |
| B3683 | President/CEO''s Office | 5/29/21 |
| C3553 | Lending | 5/29/21 |
| C2222 | Finance | 6/5/21 |
| C1296 | Finance | 6/5/21 |
| B6326 | Information Services | 6/5/21 |
| A9865 | Branch Operations | 6/5/21 |
| B7788 | Branch Operations | 6/5/21 |
- wesleygeddes5553 years agoNew Member
I have been experiencing the exact same issue.
Here is the measure:
Number of Issues during the Period = VAR EndDatePerVisual = MAX('Date'[Date]) VAR StartDatePerVisual = MIN('Date'[Date]) VAR RESULT = CALCULATE( [Number of Issues], REMOVEFILTERS('Date'), Issues[Start Date] <= EndDatePerVisual, Issues[Due Date] > StartDatePerVisual || ISBLANK(Issues[Due Date]) ) RETURN RESULTIt's really easy to visualize this problem when using a "Line and clustered column chart:
The configuration of this visual is here:
The measure being stored in "Column y-axis" is the SAME measure in the "Line y-axis." But yet the total value for the line and the columns are different.
- LazyBanker2 years agoNew Member
Were you able to figure out the difference? I'm experiencing a similar issue.