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
Anonymous
Not applicable

DAX - Dates -Min and Max

Hi,

 

My question is around DAX formula. 

I am working on dates-login timestamp. I want to count how many times this person login to the system.

My table have ID, datetimestamp columns. 

id  datetimestamp

1    28/09/2020 11:14

1    28/09/2020 11:18

1    28/09/2020  22:23

2   16/09/2020  09:01

2    17/09/2020  15:59

 

step 1: find Min date and Max date of each person

step 2: then count 

Can you please help with DAX.

 

Many thanks

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

I can't attach pbix, hence adding images here.

I hope this will help you to get the expected results.

 

login Max datelogin Max datelogin min datelogin min dateLoginsLoginsREsultREsult

 

Note:- Do mark this as accepted solution if it solve the problem.

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

I can't attach pbix, hence adding images here.

I hope this will help you to get the expected results.

 

login Max datelogin Max datelogin min datelogin min dateLoginsLoginsREsultREsult

 

Note:- Do mark this as accepted solution if it solve the problem.

Anonymous
Not applicable

Hi,

How to add date slicer and get dynamic count of ID's?

tbl1

ID timestamp

1 28/09/2020 11:14

1 29/09/2020 11:14

1 30/09/2020 11:14

1 1/10/2020 11:14

1 3/10/2020 11:14

1 5/10/2020 11:14

tab2

After using the above DAX formulas my table now looks like this:

ID min_date Max_date TotalLogin

1 28/09/2020 05/10/2020 6

Using date slicer if I select min_date =3/10/2020 and max_date = 5/10/2020 . My Total login should be 2.

The total logins are not count of dates but count of Id's.

Time can be ignored for now.

Thank you for helping with DAX.

Anonymous
Not applicable

Thank you Deepak.

amitchandak
Super User
Super User

@Anonymous , How would Min max relate to number of logins login 

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.