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
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.


@ 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!:
The Definitive Guide to Power Query (M)

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]))


@amitchandak value is changing for each month 😞

Greg_Deckler
Super User
Super User

@Sdhn420 Perhaps try something like:

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

@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

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.