Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
motyagi
Helper I
Helper I

Grand Total In power BI matrix doesn't match

Hi There, 

 

I have a Table and the grand totals for a measure dont match up. i.e If I add each row in the table in excel it doesn't give me the same result as Power BI. 

 

How can i fix this ? Please Help !!!

 

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@motyagi

 

Hi, try with this measure:

 

Result-CostExpectation =
IF (
    HASONEVALUE ( Table1[Project ] );
    [CostExpectationM];
    SUMX ( VALUES ( Table1[Project ] ); [CostExpectationM] )
)

Regards

Victor




Lima - Peru

View solution in original post

8 REPLIES 8
sqlguru448
Helper III
Helper III

Can you provide sample data where you have issue?

Project NI PY Total PYNI % I CY Cost Expectation 
A16302417437123767943.91%104112029185628247.3
B4231099711587985436.51%3679047457949449.39
C2139526613846731915.45%4847409357332877.72
D390563314003412.44%13747351570016.429
Total22712100062872488636.12%190751331298627859.5

 

Cost Expectation  = ICY/(1-NI %) 

The grand total is performing this at the grand total level row I just need it to add it for all the Projects so the sum is 302480591. 

 

Thanks

ss.PNG

I am not sure what exact relationship you have in your modeling, but when I tried to populate and apply the formula for cost expectation. I was able to see the correct Grand Total.

 

Screenshot Above.

 

 

My cost expectation is a measure and not a calculation cause of I am trying to avoid circular dependencies.

 

Can anyone help me with this request ?

Vvelarde
Community Champion
Community Champion

@motyagi

 

Hi, try with this measure:

 

Result-CostExpectation =
IF (
    HASONEVALUE ( Table1[Project ] );
    [CostExpectationM];
    SUMX ( VALUES ( Table1[Project ] ); [CostExpectationM] )
)

Regards

Victor




Lima - Peru

Thank You so much Victor !!!! Smiley Happy

89898
Frequent 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    
RegionPO NumberInvoice QTYReceive QTYUnit Costs
AABC3280
AABC1280
BCDE23100
BCDE23100
CEFG5890
CEFG1890

 

Measurement created     
RegionPO Numbersum- Invoice QTYAverage Receive QTYRemaining QTYAverage unit costsTotal costs
AABC42280160
BCDE431100100
CEFG68-2900

 

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.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.