+ Reply to Thread
Results 1 to 3 of 3

How to write DAX measure to calculate average for year

  1. #1
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    768

    How to write DAX measure to calculate average for year

    I've like t write a measure to calculate the average sales for each year;


    I've tried a couple of methods, one ;

    Please Login or Register  to view this content.

    Which give the correct answer providing all dates / months have values in them
    I have also used AVERAGEX with crossjoin,


    Please Login or Register  to view this content.
    This works but can I just use average and wrap in calculate to remove or keep filter context as required, as for the denominator in a percentage?

    Workbook attached.

    Richard.
    Attached Files Attached Files

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,966

    Re: How to write DAX measure to calculate average for year

    I think you could just use:

    Please Login or Register  to view this content.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Contributor
    Join Date
    08-03-2021
    Location
    London
    MS-Off Ver
    365
    Posts
    768

    Re: How to write DAX measure to calculate average for year

    Thanks, I knew I was making hard work of it, I'd tried just about every combination, using all , values, allexcept , crossjoin and summeraize.

    RD

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Help to write a DAX measure to average three columns ignoring blanks
    By rv02 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-20-2016, 06:36 AM
  2. [SOLVED] Without Helper Column to Calculate Average Year
    By jackson_hollon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-15-2016, 12:34 AM
  3. How to calculate the average tenure in Year and Month
    By Nisha Dhawan in forum Excel General
    Replies: 5
    Last Post: 06-11-2015, 03:23 AM
  4. [SOLVED] Calculate average and standard deviation for each year and exclude 0s
    By excelas88 in forum Excel Formulas & Functions
    Replies: 13
    Last Post: 05-01-2015, 05:37 PM
  5. [SOLVED] How to calculate average by month and year
    By 1losthuman in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-03-2015, 11:20 AM
  6. Calculate the highest 5 consecutive year average salary
    By monid78 in forum Excel Formulas & Functions
    Replies: 40
    Last Post: 04-20-2013, 04:28 PM
  7. Replies: 3
    Last Post: 02-01-2013, 05:15 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1