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.
Is there a way to add a custom column at the query level for rounding down to nearest 30 minute interval?
This is my current custom column outside of the query:
Interval = TIME(HOUR(v_nm_cic_eAgentActivityLog[event_time]), ROUNDDOWN((MINUTE(v_nm_cic_eAgentActivityLog[event_time])/60)*2, 0) * 30, 0)
I can't get this to be added at the query level, however. I need this to perform an inner merge on another table.
Solved! Go to Solution.
Hi @kylebi1,
It seems that your formula is written using the Dax function.
In Query Editor, you could create a custom column with the formula below which logic should be more easier.
Nearest 30 Minute Interval= Table.AddColumn(#"Changed Type", "Custom", each Time.From(Text.From(Time.Hour(Time.From([Time])))&":"&(if Time.Minute(Time.From([Time]))>= 30 then "30" else "0")&":00"))
Here is the output.
In addition, you also could have a reference of this video about Round time to nearest x min with Power Query.
Best Regards,
Cherry
Hi @kylebi1,
It seems that your formula is written using the Dax function.
In Query Editor, you could create a custom column with the formula below which logic should be more easier.
Nearest 30 Minute Interval= Table.AddColumn(#"Changed Type", "Custom", each Time.From(Text.From(Time.Hour(Time.From([Time])))&":"&(if Time.Minute(Time.From([Time]))>= 30 then "30" else "0")&":00"))
Here is the output.
In addition, you also could have a reference of this video about Round time to nearest x min with Power Query.
Best Regards,
Cherry
Thank you!!!!
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 |
---|---|
111 | |
94 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |