Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Crosspost from How do I do a correlation report on Power BI Desktop - Microsoft Community
Say I'm wanting to take data, and correlate it to each other.
I have thousands of rows I'm importing from MySQL, and what I want to do is see if this serial number pops up again but with a different record type, within a certain amount of time, and then highlight/mark/isolate it.
Here's an example:
The recordtype of N01 is considered the source of truth, while service is if a service was called for that serial number.
Effectively, I want to see if I'm able to somehow see if that serial number shows up in N01 after the service call was raised (within a 48 hour timespan)
I'm newer to Power BI, so I'm not 100% sure if that is even possible. Any pointers or leads would be great!
Edit1: Does this involve multiple if's nested down, and if so, how would I (for each row) save the date and serial number as variables to be used within Power Query M?
Reply1:
Just wanted to add on, I'm trying with converting the DateTime to epoch, and using 12 hours as an example:
and trying something with this (n01 being another query):
if [RecordType] = "service" then
if [serialnumber] = n01[serialnumber] and n01[datetime] < [Time12HoursAfter]
then "True"
else "False-nestedif"
else "False-rootif"
But this just returns False-nestedif. Is there a way to do a for each in n01?
Hi @Anonymous ,
Can you further clarify your needs, or show screenshots of the results you expect. I will conduct an in-depth analysis.
Looking forward to your reply.
Best Regards,
Henry
Basically, I want to be able to discover if someone is abusing the "Report a service incident" function in our system.
We have two tables, N01, which when a machine is used, the activity is logged here. The other table logs when a user reports a service incident. I want to see if its possible to get a list of serial numbers that has had a service incident logged, but the machine was used within 48 hours after the logged incident.
Hopefully that helps
Hi @Anonymous ,
For the latest version of powerbi, the above functions may not be realized. You can post your idea here:Ideas - Microsoft Power BI Community
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.