Forum Discussion

meschoudhary's avatar
meschoudhary
Frequent Visitor
7 years ago

Concatenate only unique strings in measure

I'm struggeling with a measure. I have data table as shown below with Country, 6 years data (2019-2024) & 5 differeten wind coloums. What is want is show concatenated unique wind values for each country. as show in the output table below.

 

Data Table

Country        Year      Wind 1       Wind 2           Wind 3       Wind 4        Wind 5

Russia2019A(0.16)C(0.12)C(0.12)C(0.12)B(0.14)
Russia2020A(0.16)A(0.16)A(0.16)B(0.14)B(0.14)
Russia2021A(0.16)A(0.16)A(0.16)B(0.14)B(0.14)
Russia2022A(0.16)A(0.16)A(0.16)B(0.14)B(0.14)
Russia2023A(0.16)A(0.16)A(0.16)B(0.14)B(0.14)
Russia2024A(0.16)A(0.16)A(0.16)B(0.14)B(0.14)
Turkey2019A(0.16)A(0.16)A(0.16)B(0.14)B(0.14)
Turkey2020A(0.16)A(0.16)A(0.16)B(0.14)B(0.14)
Turkey2021A(0.16)A(0.16)A(0.16)B(0.14)B(0.14)
Turkey2022A(0.16)A(0.16)A(0.16)B(0.14)B(0.14)
Turkey2023A(0.16)A(0.16)A(0.16)B(0.14)B(0.14)
Turkey2024A(0.16)A(0.16)A(0.16)B(0.14)B(0.14)

 

 

Output -

 

 RussiaTurkey
Wind 1A(0.16)A(0.16)
Wind 2C(0.12),A(0.16)A(0.16)
Wind 3C(0.12),A(0.16)A(0.16)
Wind 4C(0.12),B(0.14) B(0.14)
Wind 5B(0.14)B(0.14)

1 Reply

  • v-evelk's avatar
    v-evelk
    Microsoft Employee

    Hello,

     

    Looks like you need to use DAX, but this question is out of our expertise because it is a feature of Power Bi Desktop.

    Please, try to use DAX and if you have some questions regarding it you can ask them in the Desktop thread.

     

    Evgenii Elkin,
    Software Engineer
    Microsoft Power BI Custom Visuals
    [email protected]