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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

PowerBI Comparable to DataStruct

I am more used to programming than clicking button in a tool, but the "Microsoft Language" misses for me some essential tools for working.
 

I got a Database which has some Old Conventions of a Primary Key Number which is essential for handling the Data. To ensure that the Convention is the right one I want to check every Element of this Colum with a Table/HashMap or something similiar to check if the Element exists in this table and change it then to a linked Value.

 

Like in a Hashmap...

 

[ValueColum]Compare to Key --> If True --> [ValueColum]= HashmapKey

 

I searched the docs and Internet and sadly didnt find a solution, i thought i got one when I found the "Record" tool from Microsoft but this doesnt work since it can't compare the whole datastruct to a Colum, or may i miss there something?

4 REPLIES 4
AlexisOlson
Super User
Super User

I'm not fully understanding what you're asking either. Can you restate what your goal is without "datastruc" or "HashMap" as those are not commonly used jargon in this community?

 

It seems like you want to do some kind of comparison and/or update of some columns/tables but it isn't clear to me what you're comparing and why.

bcdobbs
Super User
Super User

Hi,
I'm not fully familiar with some of the terminology you use however I think you're looking to ensure every record in one table as a related value in another?

 

In Power Bi if you create a relationship between the two tables I'm assuming it will form a 1 to many relationship?

 

There are then various ways to check that referential integrity is intact. 

Easiest is to add a calculated column to the table on the many side and use RELATED.

 

Eg
RelatedId = RELATED ( OneSideTable[Primary Key] )

 

You can then filter to records where this is not the case.

 

If I'm missing the point entirely let me know and try and find some common terminology!



Ben Dobbs

LinkedIn | Twitter | Blog

Did I answer your question? Mark my post as a solution! This will help others on the forum!
Appreciate your Kudos!!
Anonymous
Not applicable

Hey Guys,

 

thanks for the answers but they both dont satisfact me.

 

@bcdobbs I got a convention table with Serial Numbers which have been converted into a new format.

 

So the table i am including has partial still this old serial numbers in it, they may pop up multiple times, so i can't just match 1 colum to another.

 

It's more a Check if the number is an old serial number, and IF "true" then i swap it to a assigned new number.

 

I need the whole "table" i want to use for my charts with the same serial number format, right now i got a mixed format which doesnt sort my data then.

This sounds like something that can be done fairly easily in the query editor. Take your data table and merge it with a table that has the old --> new serial mapping, expand the new serial column, and write a conditional column to consolidate the serial number columns.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.