The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hey guys,
I would like to put together this value (in red) if the time difference between 2 value (date/time) is more than 540 minutes.
i mean, if the past value have a difference of time more than 9 hours, group the [Event_Name] value the past and the next.
How I can do that ?
Thanks in advance
Solved! Go to Solution.
Make a new column by using below functions :
TimeDiff =
VAR TimeNow =
UTCNOW ()
VAR TimeDiff =
DATEDIFF ( sv_update_date, TimeNow, MINUTE )
RETURN
IF ( TimeDiff >= 540, CONCATENATE ( Event_Name, sv_update_date ), BLANK () )
Regards,
Gaurav Raj Singh
This should give sv_last_update for same even
maxx(filter(table,table[event_name]=earlier(table[event_name]) && table[sv_update_date]<earlier(table[sv_update_date])),table[sv_update_date])
This you can use to diff and calculate
Appreciate your Kudos. In case, this is the solution you are looking for, mark it as the Solution. In case it does not help, please provide additional information and mark me with @
Thanks. My Recent Blog -
Winner-Topper-on-Map-How-to-Color-States-on-a-Map-with-Winners , HR-Analytics-Active-Employee-Hire-and-Termination-trend
Power-BI-Working-with-Non-Standard-Time-Periods And Comparing-Data-Across-Date-Ranges
Connect on Linkedin
Make a new column by using below functions :
TimeDiff =
VAR TimeNow =
UTCNOW ()
VAR TimeDiff =
DATEDIFF ( sv_update_date, TimeNow, MINUTE )
RETURN
IF ( TimeDiff >= 540, CONCATENATE ( Event_Name, sv_update_date ), BLANK () )
Regards,
Gaurav Raj Singh
Hi @NnIc0 ,
What do you mean by "group the [Event_Name] value the past and the next." Can you give some sample data in a copyable table (never post pictures of your data, that doesn't let us copy it into power bi!) and the expected output? Do you expect a calculated table, a calculated column or some sort of measure? If so, how is that measure used, in what visuals etc?
Thanks!
Djerro123
Proud to be a Super User!
User | Count |
---|---|
15 | |
12 | |
7 | |
6 | |
5 |
User | Count |
---|---|
24 | |
20 | |
12 | |
9 | |
7 |