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 August 31st. Request your voucher.
Hi All,
Here's a screenshot of my data.
I want to group the data where the DateTimeDT is within 2 minutes of the logged time.
I tried to do this by removing the seconds from the entry (with the column DateTime), but some entries occur in the next minute frame.
Would you do this in Powery Query or Dax?
I have another question but I'll post it separately.
You should create another column that looks at the difference using Duration.TotalSeconds:
Duration.TotalSeconds([Time] - [Log])
That will return the difference in seconds and anything less than or equal to 120 is what you want. You can then wrap that in an if/then/else clause and return true or false, or whatever, and group by that. When you group, you may want to use the GroupKind.Local optional 3rd parameter of the Table.Group function. You will need to add it manually in the formula bar after doing the group by. It will group on each change in true/false, not all true/false into two massive groups.
If that isn't what you want, please be more clear, and give us data to work with.
How to get good help fast. Help us help you.
How To Ask A Technical Question If you Really Want An Answer
How to Get Your Question Answered Quickly - Give us a good and concise explanation
How to provide sample data in the Power BI Forum - Provide data in a table format per the link, or share an Excel/CSV file via OneDrive, Dropbox, etc.. Provide expected output using a screenshot of Excel or other image. Do not provide a screenshot of the source data. I cannot paste an image into Power BI tables.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI Reporting