Forum Discussion
Ito_c
4 years agoFrequent Visitor
Percentage value mismatch between Table value and Line and Clustered Column Chart value
Hi everyone,
I'm facing a mismatch between values due my calculation DAX formula.
I have a dataset below and I need to count the subjects by fiscal month and return a percentage of this subjects by fiscal month. For the table the result is OK, but for chart the return is only 100%.
The dataset:
| Fiscal_Year | Fiscal_Month | Subject_Title | Evaluation |
| FYear20 | FMonth11 | Algebra I | Good |
| FYear20 | FMonth11 | Algebra II | Bad |
| FYear20 | FMonth11 | Algebra III | Bad |
| FYear20 | FMonth12 | Statistic | Neutral |
| FYear21 | FMonth01 | Social Science | Bad |
| FYear21 | FMonth01 | Algorithms | Good
|
I used both calculation DAX formulas:
Spoiler
FirstCalculation = CALCULATE(DISTINCTCOUNT('Table'[Subject_Title]) / CALCULATE(DISTINCTCOUNT('Table'[Subject_Title]),ALLSELECTED('Table'[Subject_Title])))
Spoiler
SecondCalculation = CALCULATE('Table'[FirstCalculation],ALL('Table'[Evaluation]))
The result work fine for table, but not for the chart:
Does anyone knows how to plot the same result from column "Second Calculation" in this chart? I'm sure that the problem is related to my DAX formula, but I'm trying to use the Fiscal Month as the ALL filter without success.
Ito_c , as per your given data I have created % Eva Measure based on Fiscal Month.
% Eva =VAR a_ = CALCULATE(COUNT(Table1[Fiscal_Month]))VAR b_ = CALCULATE(COUNT(Table1[Fiscal_Month]),ALLEXCEPT('Table1',Table1[Fiscal_Month]))RETURN DIVIDE(a_,b_)Then use this on Stacked Column chart so getting the correct result.