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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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