Našimi kurzy prošlo více než 10 000+ účastníků
2 392 ověřených referencí účastníků našich kurzů. Přesvědčte se sami
The RELATEDTABLE function assigns values from the associated table. But while RELATED takes values from the “short” table to the “long” one (from the “number one” site of the relation to the “star” one) , RELATEDTABLE goes backwards.
Therefore, while the RELATED output is one unique value, the output of the RELATEDTABLE function is a set of values. To calculate it in a column, the output must be combined with some other function.
It sounds complicated, but it’s not that terrible. Let´s demonstrate it on this example.
In the first table there are sales in our branches, which are in different countries. In the other table, there are countries, and we want to summarize the total revenue there.
Lets upload the data to Power BI and create the relationship.
Write this formula to a new column in a Dimension table:
Total revenue for this country= SUMX(RELATEDTABLE(Items);Items[Revenue])
RELATEDTABLE assigns the proper table and SUMX calculate the values.
Comments are closed.
2 392 ověřených referencí účastníků našich kurzů. Přesvědčte se sami
Pište kdykoliv. Odpovíme do 24h
© exceltown.com / 2006 - 2023 Vyrobilo studio bARTvisions s.r.o.
Hi ,
I am new to power BI,
How to use Sumx(relatedtable()) for String data type
Please give a solution for this
I think the function VALUE(text) should be used to convert the string values to numeric data type, and after this the aggregate function SUMX can be used with RELATEDTABLE function.