Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
az38
Community Champion
Community Champion

join generateseries by condition

hello!

 

Ive got a

tablePeriod =  GENERATESERIES (
DATE ( 2018, 5, 1 ),
DATE ( 2018, 5, 3 ),
TIME ( 0, 30, 0 )
)

 

and Ive got a user's session log:

session_id; session_starttime; session_endtime

 

and i need to know count(session_id) for each value from tablePeriod that >=session_starttime and <= session_endtime

 

result is a tablePeriod from two columns: Period, CountSessions

 

Thank you!

 

 


 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@az38,

 

You may use DAX below to add a calculated column.

Column =
COUNTROWS (
    FILTER (
        'session',
        'session'[session_starttime] <= tablePeriod[Value]
            && 'session'[session_endtime] >= tablePeriod[Value]
    )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-chuncz-msft
Community Support
Community Support

@az38,

 

You may use DAX below to add a calculated column.

Column =
COUNTROWS (
    FILTER (
        'session',
        'session'[session_starttime] <= tablePeriod[Value]
            && 'session'[session_endtime] >= tablePeriod[Value]
    )
)
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thx, perfect!


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
az38
Community Champion
Community Champion

So, I want to define how many users were active on the server at each moment (each row) from the table tablePeriod 


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

Check out the July 2024 Power BI update to learn about new features.

July Newsletter

Fabric Community Update - July 2024

Find out what's new and trending in the Fabric Community.