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

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.

Reply
bclrk
Advocate II
Advocate II

Id based on multiple columns

Hello,

 

I need an id based on three different columns with text. Right now the way that I am doing this is by concatenating all three columns together using the DAX below and it is working fine.

factorid = factors[desk] & ":" & factors[name] & ": " & factors[factor]

However, I am new to Power BI and this doesn't feel optimal. Is there a command that could give me a unique integer based on the value in three different columns? Some kind of hash maybe?

 

Thank you

5 REPLIES 5
v-yuta-msft
Community Support
Community Support

@bclrk ,

 

Maybe something like below?

factorid =
VAR _1 = factors[deskcode]
VAR _2 = factors[model_name]
VAR _3 = factors[factor]
RETURN
    CONCATENATE ( _1, CONCATENATE ( _2, _3 ) )

Regards,

Jimmy Tao

I don't think that would work because there are different values in a single column that need to be distinguished. 

kentyler
Solution Sage
Solution Sage

Can you tell us why you need the unique id.





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


I want to have three filters, f1, f2, and f3, such that f1 filters f2 and f3, f2 filters f3 and all of them filter data from two different data tables.

 

In order to get these filters to work, I created a new table that has a one to many relationship with the two data tables via the factorid.

The other idea that comes up is that this is usually done before loading the data into power bi, if you can access the data file and operated on it, maybe in excel, access or sql server





Did this post answer your question? Mark it as a solution so others can find it!

Help when you know. Ask when you don't!




Join the conversation at We Talk BI find out more about me at Slow BI


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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