The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello everybody,
I have this table, let's call it table1. I want to create a new column, that I called column_that_I_want. This column should aggregate the distinctive Rates per Code, and should be sorted by Type. Therefore, if for the same code i have 2 different Rates, such as 7 and 2, these should be agregrated and separated by a comma and in percentage format. Additionally, the order they appear should depend on the values of Type. If Type is 2 for Rate 2 and code 1, and if Type is 1 for Rate 7 and code 1, the order should be 7.00%, 2.00%.
Thanks in advance
Solved! Go to Solution.
I was able to solve it
column_that_I_want =
VAR CurrentCode = Table1[Code]
RETURN
CONCATENATEX(
FILTER(
SUMMARIZE(
Table1,
Table1[Code],
Table1[Rate],
Table1[Type]
),
Table1[Code] = CurrentCode
),
FORMAT(Table1[Rate], "0.00%"),
", ",
Table1[Type],
ASC
)
I was able to solve it
column_that_I_want =
VAR CurrentCode = Table1[Code]
RETURN
CONCATENATEX(
FILTER(
SUMMARIZE(
Table1,
Table1[Code],
Table1[Rate],
Table1[Type]
),
Table1[Code] = CurrentCode
),
FORMAT(Table1[Rate], "0.00%"),
", ",
Table1[Type],
ASC
)
Hi @elcamino ,
If the problem has been solved, please consider accepting your response as a solution, which will help more people in need.
Best regards,
Mengmeng Li
Thanks.
Done.
Best regards