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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
locle90
Helper I
Helper I

How to sum data by year of Measure

Dear All,

I have created the Measure with average data = sum ( value ) / Sum ( qty ) by month or by item.

I want to SUM data of average by month when i select year at the yellow color. How can i do that ? Please give me your advice.

Thanks in advance.

locle90_0-1696565877710.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @locle90 ,

I created a sample pbix file(see the attachment), please check if that is what you want.

Total = 
VAR _tab =
    SUMMARIZE (
        'Table',
        'Table'[Date],
        "@avg", DIVIDE ( SUM ( 'Table'[value] ), SUM ( 'Table'[qty] ) )
    )
RETURN
    SUMX ( _tab, [@avg] )

vyiruanmsft_0-1697792915298.png

Best Regards

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @locle90 ,

I created a sample pbix file(see the attachment), please check if that is what you want.

Total = 
VAR _tab =
    SUMMARIZE (
        'Table',
        'Table'[Date],
        "@avg", DIVIDE ( SUM ( 'Table'[value] ), SUM ( 'Table'[qty] ) )
    )
RETURN
    SUMX ( _tab, [@avg] )

vyiruanmsft_0-1697792915298.png

Best Regards

ChiragGarg2512
Solution Sage
Solution Sage

@locle90 , If there is a measure that gives average correctly putting it in a table visual with month should give a total value at the bottom row. If the requirement is to get sum of average in a card visual the dax will be different.

Dear @ChiragGarg2512

The table is one of the options. But how we can do that if we need to show on the card ?

 

Thanks

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.