Results 1 to 4 of 4

Countrows help

Threaded View

  1. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,824

    Re: Countrows help

    Not sure how/if it can be done with a DAX measure, however here is a formula based proposal.
    Populate a column of discrete hours 0:00 ... 23:00
    The adjacent column is populated using:
    Formula: copy to clipboard
    =SUM(SUMPRODUCT((MOD(Table1[Arrival],1)>=I2)*(MOD(Table1[Arrival],1)<SUM(I2,1/24))),SUMPRODUCT((MOD(Table1[Exit],1)>=I2)*(MOD(Table1[Exit],1)<SUM(I2,1/24))),SUMPRODUCT((MOD(Table1[Arrival],1)<I2)*(MOD(Table1[Exit],1)>=SUM(I2,1/24))),SUMPRODUCT((INT(Table1[Arrival])<INT(Table1[Exit]))*(MOD(Table1[Exit],1)>=I2)))-SUMPRODUCT((INT(Table1[Arrival])<INT(Table1[Exit]))*(MOD(Table1[Exit],1)>=I2)*(MOD(Table1[Exit],1)>=I2)*(MOD(Table1[Exit],1)<SUM(I2,1/24)))

    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. DAX - calculate % of Grand Total using COUNTROWS
    By _eNVy_ in forum Excel Charting & Pivots
    Replies: 7
    Last Post: 04-03-2020, 05:17 AM
  2. Excel DAX Countrows with to
    By Hassan1977 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-22-2017, 12:24 PM
  3. [SOLVED] countrows
    By KBSH in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-05-2017, 11:45 AM
  4. [SOLVED] [SOLVED] Help with Countrows functionality within a Macro
    By Pank in forum Excel - New Users/Basics
    Replies: 5
    Last Post: 07-11-2005, 03:05 PM

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