Forum Discussion

Gsar's avatar
Gsar
Frequent Visitor
4 years ago
Solved

Count Specific Time Slots within Time range

Hey Everybody.   I am new and have never posted in the forum before, but I have been using it a lot to have some of my questions answered.   I have tried to add a sample file for my problem but i...
  • VahidDM's avatar
    4 years ago

    Hi Gsar 

     

    Try this measure:

    Count Time Slot = 
    VAR _A =
        ADDCOLUMNS(
            'Time slots',
            "C",
                COUNTROWS(
                    FILTER(
                        'Table Transactions',
                        'Time slots'[Time Start]  < 'Table Transactions'[Time END]
                           && 'Time slots'[Time End] > 'Table Transactions'[Time Start]
                    )
                )
        )
    RETURN
        SUMX( _A, [C] )

     

    Output:

     

     

     

     

     

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
    Appreciate your Kudos!!
    LinkedIn: 
    www.linkedin.com/in/vahid-dm/