Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

How do I do a correlation report on Power BI Desktop

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:

Image - https://filestore.community.support.microsoft.com/api/images/a9f95980-7cea-4f59-b1fb-53b81974c4e5?up...

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:

Image - https://filestore.community.support.microsoft.com/api/images/52888ded-51c1-4f7d-9bb2-7d6fb8c3c204?up...

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?

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

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

Anonymous
Not applicable

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.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors