Results 1 to 5 of 5

DAX Measure to Count rows that have in date table that match dates in fact table.

Threaded View

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

    DAX Measure to Count rows that have in date table that match dates in fact table.

    I would like to count the number of month in a Year / Month Pivot table that have sales,

    so if all months have sales = 12 etc.

    I have managed to do this by using the date column and the built in hierarchy in the fact table ;

     TableCount:=    COUNTROWS(SUMMARIZE(Table1,Table1[Date (Year)],Table1[Date (Month)]))
    and then ;

     ModifyTableCount:=CALCULATE( [TableCount], ALL(Table1),VALUES(Table1[Date (Year)]) )
    Which works, surprisingly, when used in a pivot table using the Calendar / date table years and months.


    Is there way to get this result with creating all the extra columns in the sales / fact table as these only existed creating the pivot using the date hierarchy.

    I've attached both showing both using Dates from date table and dates from fact table.

    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. DAX Filter fact table by Dates on dim table
    By Dicken in forum Office 365
    Replies: 1
    Last Post: 02-02-2023, 12:42 PM
  2. Using distinct count measure in Pivot table
    By HR85 in forum Excel General
    Replies: 1
    Last Post: 03-16-2022, 05:30 PM
  3. Pivot Table: Grand Total different measure from Column measure
    By chinneywow in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 08-07-2019, 06:22 AM
  4. Replies: 4
    Last Post: 06-20-2019, 03:04 PM
  5. [SOLVED] Match a date from a Table of dates, Help Please.
    By john dalton in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-05-2015, 08:48 AM
  6. Countifs to count rows with a date which match a range of dates
    By pharmerjoe7 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-07-2013, 06:19 AM
  7. Replies: 1
    Last Post: 11-29-2011, 10:52 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