Results 1 to 3 of 3

Thread: Counting values in previous period(s) DAX

  1. #1

    Counting values in previous period(s) DAX



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi.

    I have one column named Month Tagged which contains dates from TODAY all the way back to 2012. I have 100K of lines of data with a Month Tagged field on every line.

    I do reporting every month for the previous 11 months.

    All I want to do is a calculated measure that counts the amount of times each month occurs in the previous 11 months.
    dax
    So for May 2016 reporting I will want to cont how many time each Month Tagged occur from June 2015 to April 2016.

    Any help would be appreciated

  2. #2
    Administrator Ken Puls's Avatar
    Join Date
    Mar 2011
    Location
    Nanaimo, BC, Canada
    Posts
    2,343
    Articles
    57
    Blog Entries
    14
    Excel Version
    Excel Office 365 Insider
    How do you tell the system you're working on May 2016? Do you have a timeline/slicer hooked up to a specific field?

    The Month Tagged... is this is date, or just a number? Can you post a five line sample of that that table looks like?
    Ken Puls, FCPA, FCMA, MS MVP

    Learn to Master Your Data at the Power Query Academy (the world's most comprehensive online Power Query training), with my book M is for Data Monkey, or our new Power Query Recipe cards!

    Main Site: http://www.excelguru.ca -||- Blog: http://www.excelguru.ca/blog -||- Forums: http://www.excelguru.ca/forums
    Check out the Excelguru Facebook Fan Page -||- Follow Me on Twitter

    If you've been given VBA code (a macro) for your solution, but don't know where to put it, CLICK HERE.

  3. #3
    Currentley I use the below excel formula to tell it the current month and then -1 =TEXT(EOMONTH(TODAY(),-1),"MMMM")

    No I have no timeline or slicer hooked up

    Month Tagged is in the format 05/2016, 04/2016 etc.... or if i do a FORMAT calculated column I can get it to look like May-16, Apr-16 etc.....

    Example Data:

    [Month Tagged]
    01/2016
    01/2016
    01/2016
    04/2016
    04/2016
    04/2016
    04/2016
    04/2016
    04/2016
    10/2015
    10/2015
    10/2015
    10/2015
    10/2015
    11/2015
    11/2015
    11/2015
    11/2015
    12/2015
    12/2015
    12/2015
    12/2015

Tags for this Thread

Posting Permissions

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