Forum Discussion
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
- kentylerSolution Sage
Can you tell us why you need the unique id.
- kentylerSolution Sage
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
- bclrkAdvocate II
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.
- v-yuta-msftCommunity 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
- bclrkAdvocate II
I don't think that would work because there are different values in a single column that need to be distinguished.