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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Matrix not showing correct total for measure, how to get it show as average?

Good morning Powerbi family,

 

i created a measure to calculate a ratio between two columns ( with filters built in )

when i put it against the data, it shows correctly on each row.

but on the total it shows a number that looks like an average, but it is actually not .

i have calculated the average, and it is not the number shown on the Totals (1.04).

 

I have look at other thread, but i couldn't find a similar problem because the way my measure was setup.

can anyone help me with this one?0596bdb89b60fe771acd2f5972a9d3e3.jpg

3 REPLIES 3
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

You could create a new measure like:

Average =
IF (
    ISINSCOPE ( 'TableName'[HKDATE] ),
    [reh/LS ALL LSWS Transfer OUT moves],
    DIVIDE (
        SUMX ( 'TableName', [reh/LS ALL LSWS Transfer OUT moves] ),
        CALCULATE ( DISTINCTCOUNT ( 'TableName'[HKDATE] ), ALLSELECTED ( 'TableName' ) )
    )
)

If you still have problems, please provide your sample data, and pay attention to protecting privacy.

 

 

Best Regards,

Stephen Tao

 

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

 

amitchandak
Super User
Super User

@Anonymous , Distinct count is recalculated for grand total, so that number is not the sum of rows values. Hope you are not trying to sum the denominator and check?

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Anonymous
Not applicable

@amitchandak 
I see,
how do i get the grand total to show average instead ?
because i need to show the average over a period of time as a KPI

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.