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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
UsernameDSN
New Member

Totals and average in one visual

Hi All,

 

I have a matrix with values, I have added grand totals, no issues. However I also need to add averages (of sum values, not average values) and percent of total. I have tried multiple measures and all of them work, but they also add values in the months. That way I end up with 3 values in each month. I need to have only one value in the month - sum value. Is there a way to do that? Thank you.

 

 JunJulyAugustSeptemberOctoberNovemberDecemberTotalAveragePercent of total
Store 112000120001200015000150001500015000960002400060
Store 2 500010000100001000010000100001000065000928640
Total       161000  
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi,@UsernameDSN 

Regarding the issue you raised, my solution is as follows:

1.First I have created the following table and the column names and data are the data you have given:

 

vlinyulumsft_0-1719378389410.png

2. Below are the calculated table I've created for your needs:

new = 
VAR sum1=SUM('Table'[value])
VAR avg1 =
    SUMMARIZE (
        'Table',
        [Column1],
        "month", "_AVERAGE",
        "value", AVERAGE('Table'[value])
    )
VAR total1 =
    SUMMARIZE (
        'Table',
        [Column1],
        "month", "_Total",
        "value", SUM('Table'[value])
    )
VAR Percent1=
SUMMARIZE (
        'Table',
        [Column1],
        "month", "_Percent of total",
        "value",SUM('Table'[value])/sum1*100
        
    )
 
RETURN
    UNION ('Table', Percent1,avg1,total1 )

3.Here's my final result, which I hope meets your requirements.

 

vlinyulumsft_1-1719378439084.png

Can you share sample data and sample output in tabular format if I am misunderstanding? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

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

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi,@UsernameDSN 

Regarding the issue you raised, my solution is as follows:

1.First I have created the following table and the column names and data are the data you have given:

 

vlinyulumsft_0-1719378389410.png

2. Below are the calculated table I've created for your needs:

new = 
VAR sum1=SUM('Table'[value])
VAR avg1 =
    SUMMARIZE (
        'Table',
        [Column1],
        "month", "_AVERAGE",
        "value", AVERAGE('Table'[value])
    )
VAR total1 =
    SUMMARIZE (
        'Table',
        [Column1],
        "month", "_Total",
        "value", SUM('Table'[value])
    )
VAR Percent1=
SUMMARIZE (
        'Table',
        [Column1],
        "month", "_Percent of total",
        "value",SUM('Table'[value])/sum1*100
        
    )
 
RETURN
    UNION ('Table', Percent1,avg1,total1 )

3.Here's my final result, which I hope meets your requirements.

 

vlinyulumsft_1-1719378439084.png

Can you share sample data and sample output in tabular format if I am misunderstanding? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

Please find the attached pbix relevant to the case.

 

Best Regards,

Leroy Lu

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

Thank you so much for taking time to help me! This is what I was looking for! thank you!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.