Results 1 to 3 of 3

How to write DAX measure to calculate average for year

Threaded View

  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 ;

     CALCULATE([Tunits], ALL('Calendar'),VALUES('Calendar'[Year]) ) / 12

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


     AVERAGEX(CROSSJOIN(ALL('Calendar'[Month]),VALUES('Calendar'[Year])),[Tunits])
    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

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