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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
theitguy
Helper I
Helper I

Find Entries in Time Period

Hey,

 

I would like to measure a pretty easy thing, but at the moment I do not know how to start. I would like to calculate how many users haven't created any sessions in the first 30 days after they have been hired.

 

I have the following two tables:

Participants

Participant_IDNameDepartmentCodeHire_Date
1John Doe1234501-11-2017
2Max Mustermann1234501-11-2017
3John Smith1234501-11-2017
4Jan Janssen1234501-11-2017
5John Blow12345601-11-2017

 

 

Learning Sessions

Participant_IDLaunch_History_idLaunch_DateSeconds_Spend
12098416-11-2017444
12327116-11-201724
12327318-11-2017974
42097022-11-2017439
42330122-11-20171
52330205-12-2017221

 

As a result I would expect to see one user now, user with ID 3, because he has no sessions 30 days after his hire date.

 

Can anyone give me a hint how to start? Smiley Happy

1 ACCEPTED SOLUTION
Greg_Deckler
Super User
Super User

Seems like you would get 2,3 and 5 as not having any sessions. Regardless, you should be able to use EXCEPT function.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

5 REPLIES 5
Greg_Deckler
Super User
Super User

Seems like you would get 2,3 and 5 as not having any sessions. Regardless, you should be able to use EXCEPT function.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@Greg_Deckler

 

You are absolutely right, I expect to get 2, 3 and 5.

 

I had a look on EXCEPT. Is my consideration right that I need to do 2 steps?

First, I will identify with EXCEPTwhich participants have no sessions at all

EXCEPT(
SELECTCOLUMNS(Learning_Results_Single_Sessions_sample;"Participant_ID";Learning_Results_Single_Sessions_sample[Participant_ID]);
SELECTCOLUMNS(Participants_sample;"Participant_ID";Participants_sample[Participant_ID])

Second,  I will do a UNION with the Participants_ID who had no sessions in their first 30 days of employment

But I not know how to get these...

I thought about using DATESINPERIOD but still I am struggling.

 

 

I may be misunderstanding the data but I was thinking that if you did an EXCEPT on the ParticipantID columns from the two tables that you would have what you needed. But, again, I may not fully understand the entire data set.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hey @Greg_Deckler,

I gave it another thought and I think you are right. I guess, I had a wrong mental model.

 Hey Greg @Greg_Deckler,

 

I needed some time to think about it. I have also changed the data a bit to make it more clear.

What I want is to select a point in time (via a date slicer) and then I want to see the amount of leaners who have made progress in their first 30 days. Given the amount of all learners, I can then calculate the percentage. The same I am wanna do for 60 and 90 days after their hire date.

 

So, if I check the first 30 days, I would expect to get 2 (Participant 1 and 4), for 60 days I would expect to get 3.

Maybe this is going into the same direction as Set-FILTER-value-with-variable

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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