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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Total column problem

Hello, here is my problem:
In this visual the Total column does not calculate the average of the values, I don't know why.
Here's the DAX code of the measure and the image.

% Rdt Dorage =
Var QteProd = Calculate (SUM(Performance[QteProd]))
Var QteConso = Calculate (SUM(Performance[QteConso]))
Var Result = QteProd / QteConso  
Return
    IF(ISERROR(QteProd) || ISERROR(QteConso) || ISBLANK(QteProd) || ISBLANK(QteConso),
    BLANK(),
    Result
    )
yanek1644_0-1723543524080.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@rajendraongole1 
Sorry for my response time.
I solved the problem : 
- The data is a measure doing a ratio (Qte Prod / Qte Conso) and there was for the 06 May 2024 data for Qte Prod but no data for Qte Conso, so the total take the Qte Prod data from the 06 May in the average calcul of the month (May). 
This is why it's more than 100%.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

@rajendraongole1 
Sorry for my response time.
I solved the problem : 
- The data is a measure doing a ratio (Qte Prod / Qte Conso) and there was for the 06 May 2024 data for Qte Prod but no data for Qte Conso, so the total take the Qte Prod data from the 06 May in the average calcul of the month (May). 
This is why it's more than 100%.

Anonymous
Not applicable

Hi @Anonymous 

 

Here I create a set of sample:

vzhengdxumsft_3-1723690603888.png

 

Then add a measure:

MEASURE =
VAR _vtable =
    SELECTCOLUMNS (
        'Table',
        'Table'[ID],
        'Table'[Value],
        'Table'[tot],
        "_outcome", 'Table'[Value] / 'Table'[tot]
    )
RETURN
    AVERAGEX ( _vtable, [_outcome] )

The result is as follow:

vzhengdxumsft_2-1723690589409.png

(13.33%+46.67%+36.84%+81.82%+42.86%+57.14%+66.67%+8.33%+23.08%)/9 = 41.86%

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

rajendraongole1
Super User
Super User

Hi @Anonymous - Can you please share some sample data for work around?, it helps to analyze and share expections.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.