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.
Hi There,
I am stuck here and hoping someone can point me in the right direction as I have searched everywhere and am coming up with nothing. I have a table with login tracking data and I need to have a calculated column that is built off the previous value. I can do this very easily in Excel with the following data and formula:
=IF(B6="LOGIN",E5+1,IF(B6="SYSLOGOUT",E5,E5-1))
A | B | C | D | E |
ATTEMPTDATE | ATTEMPTRESULT | USERID | LOGINTRACKINGID | CONCURRENT LOGIN COUNT |
1/1/2019 1:02 | SYSLOGOUT | DKELLOGG | 6209259 | 0 |
1/1/2019 3:01 | SYSLOGOUT | MOSTROM | 6209546 | 0 |
1/1/2019 8:36 | LOGIN | GVILLALOBOS | 6209663 | 1 |
1/1/2019 8:44 | TIMEOUT | GVILLALOBOS | 6209668 | 0 |
1/1/2019 9:26 | LOGIN | ANEUZIL | 6209675 | 1 |
Is this even possible in Power BI?
Thanks!
-Douglas
Solved! Go to Solution.
you can create two columns
Column = if('Table'[ATTEMPTRESULT]="LOGIN",1,if('Table'[ATTEMPTRESULT]<>"SYSLOGOUT",-1,0))
Column 2 = SUMX(FILTER('Table','Table'[ATTEMPTDATE]<=EARLIER('Table'[ATTEMPTDATE])),'Table'[Column])
Proud to be a Super User!
you can create two columns
Column = if('Table'[ATTEMPTRESULT]="LOGIN",1,if('Table'[ATTEMPTRESULT]<>"SYSLOGOUT",-1,0))
Column 2 = SUMX(FILTER('Table','Table'[ATTEMPTDATE]<=EARLIER('Table'[ATTEMPTDATE])),'Table'[Column])
Proud to be a Super User!
@moored , Try a new column like
Sumx(filter(Table,[USERID] =earlier([USERID]) && [ATTEMPTDATE] <= earlier([ATTEMPTDATE])), if([ATTEMPTRESULT] ="LOGIN", 1, If([ATTEMPTRESULT] = "SYSLOGOUT",0,-1)))
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |