Forum Discussion
az38
Community Champion
7 years agoLEFT JOIN with multiple conditions
Hello, DAX-profies! I have a user sessions log User session could be started at one day and finished at the other I need to match calendar days and quantity of uniques users who were active a t...
- 7 years ago
You can create a calculated table like this:
LogInsModified = SELECTCOLUMNS( GENERATE( LogIns, VAR St = INT( LogIns[Start_Session] ) VAR En = INT( LogIns[End_Session] ) RETURN CALENDAR( st, en ) ), "Session_id", [Session_id], "User_ID", [User_id], "Date", [Date] )Then relate it to the calendar table and use this simple measure:
Active Users = DISTINCTCOUNT( LogInsModified[User_ID] )
LivioLanzo
Solution Sage
7 years ago
You can create a calculated table like this:
LogInsModified =
SELECTCOLUMNS(
GENERATE(
LogIns,
VAR St = INT( LogIns[Start_Session] )
VAR En = INT( LogIns[End_Session] )
RETURN
CALENDAR( st, en )
),
"Session_id", [Session_id],
"User_ID", [User_id],
"Date", [Date]
)
Then relate it to the calendar table and use this simple measure:
Active Users = DISTINCTCOUNT( LogInsModified[User_ID] )