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
Sdhn420
Helper IV
Helper IV

Same value for all months

Hi,

 

How can I display same value for Average sales of 3 months measure for all the months?

 

Example: 

 

Measure - Average sale of 3 months = 300

 

Code   Month    Avg Sales   qty

M100   Jul          300            600

M100  Aug        300            200

M100  Sep         300            450

7 REPLIES 7
Sdhn420
Helper IV
Helper IV

@Greg_Deckler That kind of works. Its now showing same value across months but for all codes.

 

I have different material codes - 

 

Code   Month    Avg Sales   qty

M100   Jul          300            600

M100  Aug        300            200

M100  Sep         300            450

M200 Jul            400           200

M200 Aug         400           600

@Sdhn420 - Use ALLEXCEPT instead of ALL to keep the material code filter.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler @amitchandak used this calculate(average(Table[qty]), allexcept(Table, Table[Code])) but its giving different values for all the months. 

Hi @Sdhn420 I tested this measure and it worked well like below. Does your data come from the same table or from different tables? If they are in different tables, is there any relationship between them?

020501.jpg

Regards,
Community Support Team _ Jing Zhang

@Sdhn420 , Try like

calculate(average(Table[qty]), allexcept(Table, Table[Code]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube


@amitchandak value is changing for each month 😞

Greg_Deckler
Community Champion
Community Champion

@Sdhn420 Perhaps try something like:

Average = AVERAGEX(ALL('Table'),[qty])


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.