Forum Discussion
Add a calculated column to a Matrix visualization
- 6 years ago
Got it to work. (Used a new name) What I did was use a measure. I only wanted one value for the target. The relationship is Many to One. Since there is only one value in the target type for each category I used MIN (again because there is only one value I could have just as easily used MAX) instead of sum for the target.
To Be Released = CALCULATE( MIN(SuperMarketData[Target]),ALLSELECTED(TargetData)) - CALCULATE( SUM(SuperMarketData[Before SuperMarket]) + SUM(SuperMarketData[In SuperMarket]),ALLSELECTED(TargetData))
Is your "GAP" column in the matrix a calculated column or a measure? Make sure it is a calculated column and then select SUM as the aggregation.
If this helps please kudo.
If this solves your problem please accept it as a solution.
- Robbinsbk6 years agoRegular Visitor
Yes, it is a calculated column. I tried a couple different calculations but none is working.
Gap = SUM(SuperMarketData[Target]) - SUM(SuperMarketData[SuperMarket WIP])
Gap = CALCULATE(SUM(SuperMarketData[SuperMarket WIP]) - SUM(SuperMarketData[Target]))Gap = CALCULATE(SUM(SuperMarketData[Target]) - SUM(SuperMarketData[SuperMarket WIP]),FILTER(SUMMARIZE(SuperMarketData,SuperMarketData[Die Type]),SuperMarketData[Die Type]=RELATED(TargetData[DIE_TYPE])))- Robbinsbk6 years agoRegular Visitor
Got it to work. (Used a new name) What I did was use a measure. I only wanted one value for the target. The relationship is Many to One. Since there is only one value in the target type for each category I used MIN (again because there is only one value I could have just as easily used MAX) instead of sum for the target.
To Be Released = CALCULATE( MIN(SuperMarketData[Target]),ALLSELECTED(TargetData)) - CALCULATE( SUM(SuperMarketData[Before SuperMarket]) + SUM(SuperMarketData[In SuperMarket]),ALLSELECTED(TargetData))