Forum Discussion
Grand Total In power BI matrix doesn't match
Can anyone help me with this request ?
Hi, try with this measure:
Result-CostExpectation =
IF (
HASONEVALUE ( Table1[Project ] );
[CostExpectationM];
SUMX ( VALUES ( Table1[Project ] ); [CostExpectationM] )
)Regards
Victor
- motyagi8 years ago
Helper I
Thank You so much Victor !!!! :smileyhappy:
- 898987 years agoFrequent Visitor
Hello @ Vvelarde , I am facing the same issue even though I applied the same formulas. My total number is still not sum up correctly for row and columns totals. Below is my sample data.
Table A Region PO Number Invoice QTY Receive QTY Unit Costs A ABC 3 2 80 A ABC 1 2 80 B CDE 2 3 100 B CDE 2 3 100 C EFG 5 8 90 C EFG 1 8 90 Measurement created Region PO Number sum- Invoice QTY Average Receive QTY Remaining QTY Average unit costs Total costs A ABC 4 2 2 80 160 B CDE 4 3 1 100 100 C EFG 6 8 -2 90 0 Measurement I created :
1. sum- Invoice QTY= sum(Invoice QTY)
2. Average Receive QTY = Average (Receive QTY)
3. Remaining QTY = [sum-Invoice QTY]-[Average Receive QTY)
4. Total costs = if([Remaining QTY]<0,0,([Remaining QTY]*[Average unit costs]))
5. Total costs (to be used in Power BI matrix) = if(COUNTROWS(Values(TableA[PO Number]))=1,[Total Costs],sumx(values(Table A[PO Number]),[Total costs]))
i tried countrows and hansonvalue, both appear the same result.
Appreciate if anyone can help on this issue.