time range
3 TopicsCreate a DAX that returns the title of the event within event schedule
Hi. I'm having a hard time for days thinking of how to create my DAX measure. I would highly appreciate your help. I want to create a DAX that returns the title of the event if the start and end date of viewers fall within the range of time of the event schedule. The event schedule does not exist in my Power BI model. It is just a reference regarding the order of the online event. The Viewers table is the table I have in my data model. I wish to have this scenario/output. For example: Person A joined and left the online event between 7:00am to 8:00 am, therefore the output is 'Data Driven Decision'. Person C, the output is 'Data Driven Decision', 'Litmus', 'Productivity', and 'Education' since it overlaps to 4 sessions of the online event. I tried this DAX but it does not work for overalapping start time and end time of viewers based on event schedule. Sessions Attended = DDD_Viewers[start_time] >= TIME(07,00,00) && DDD_Viewers[end_time] < TIME(08,00,00) , "Data Driven Decision", DDD_Viewers[start_time] >= TIME(08,00,00) && DDD_Viewers[end_time] < TIME(09,00,00) && DDD_Viewers[PK_Room] = "4" , "Litmus" ) Thank you, Regards, ThirdSolved1.3KViews0likes6Commentsportfolio count per time period
Sample data here. (<-- I hope that works!) What I'm working toward is a count of householdlookupid per fundraiserlookupid and date period. Take, for example, fundraiserlookupid 0095050: Householdlookupid 0210855 was assigned to that fundraiser in date period 2016/5 - 2017/4 and stayed assigned until date period 2018/5 - 2019/4. So, for this particular combo of fundraiser and household, the desired output would be: FundraserLookupid DatePeriod HouseholdCount 0095050 2016/5 - 2017/4 1 0095050 2017/5 - 2018/4 1 0095050 2018/5 - 2019/4 1 One of the things I'm trying to figure out is how to assign the dateperiod in the case of the middle row above, where the householdlookupid doesn't actually show up in the data but "is there" because it's "active" during that year.' Very much appreciate any thoughts anyone has on the matter. Thanks!Solved2.6KViews0likes8CommentsReturning an output within a time range
Hi, please help to write an appropriate DAX code. The issue: A transaction is a row that contains a Driver Number, Vehicle Number, Load Date and a Load Time. Upon checking the fact table, if a transaction for the same driver number, same load date, and load time in the time range of an hour (before or after the current load time) is found, then return the previous vehicle number, else return blank. Thanks!Solved951Views0likes2Comments