Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Here is the login details, for past 30 days and pat 90 days
Now i need to calculate for corresponding previous month .
Here are the DAX expression:
considering distinct usercount during the period he loggedin:
past 30 days:
I need to calculate total number of login by user for past 30 days. (if user login multiple times consider count as 1)
and for -90 days.
and should be shown in month level as per date slicer selecetd dates
try the below,
Past 30 days = CALCULATE(DISTINCTCOUNT(loggedinacc[UserID]),DATESINPERIOD(dimdate[CalendarDate],MAX(dimdate[CalendarDate]),-30,DAY))
Past 90 days = CALCULATE(DISTINCTCOUNT(loggedinacc[UserID]),DATESINPERIOD(dimdate[CalendarDate],MAX(dimdate[CalendarDate]),-90,DAY))
Thanks,
Arul
Hi Arul,
Thank you so much for your quick reply.
We cannot consider this value "MAX(dimdate[CalendarDate])"
We need data to calculate based on date silcer dynamically
For example :
If i selected date between 1st of Nov to Feb 28
Feb Month : number of login from 28feb minus 30 Days
Jan Month : Number of login from 31Jan minus 30 days
Dec Month : Number of login from 31dec minus 30 days
Nov Month : Number of login from 30nov minus 30 days
same for past 90 days
Feb Month : number of login from 28feb minus 90 Days
Jan Month : Number of login from 31Jan minus 90 days
Dec Month : Number of login from 31dec minus 90 days
Nov Month : Number of login from 30nov minus 90 days
If not above formula is not working. Can you share the sample data to look into it?
Thanks,
Arul
Your ask is not quite clear. Could you explain it bit more in detail?
Thanks,
Arul
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
115 | |
112 | |
105 | |
95 | |
58 |
User | Count |
---|---|
174 | |
147 | |
136 | |
102 | |
82 |