Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hey guys,
I currently have 3 tables with different data.
I need a new table, with two columns, where data is displayed like this:
Column 1 | Column 2
Row 1 | Name of table1* | Number of rows on table 1
Row 2 | Name of table2* | Number of rows on table 2
Row 3 | Name of table3* | Number of wors on table 3
* manually inserted
How could I create this table using formulas in order to update the values when I update the data?
Solved! Go to Solution.
If you only have 3 tables, I would create a new table as below.
New_table = VAR TABLE1 = "TABLE1" VAR TABLE1_COUNT = COUNTROWS('Table1') VAR TABLE2 = "TABLE2" VAR TABLE2_COUNT = COUNTROWS('Table2') VAR TABLE3 = "TABLE3" VAR TABLE3_COUNT = COUNTROWS('Table3') RETURN UNION(ROW("Table_Name",TABLE1,"Row_Count",TABLE1_COUNT), ROW("Table_Name",TABLE2,"Row_Count",TABLE2_COUNT) ROW("Table_Name",TABLE3,"Row_Count",TABLE3_COUNT)) |
If this helps, Mark it as a solution.
Kudos are nice too.
If you only have 3 tables, I would create a new table as below.
New_table = VAR TABLE1 = "TABLE1" VAR TABLE1_COUNT = COUNTROWS('Table1') VAR TABLE2 = "TABLE2" VAR TABLE2_COUNT = COUNTROWS('Table2') VAR TABLE3 = "TABLE3" VAR TABLE3_COUNT = COUNTROWS('Table3') RETURN UNION(ROW("Table_Name",TABLE1,"Row_Count",TABLE1_COUNT), ROW("Table_Name",TABLE2,"Row_Count",TABLE2_COUNT) ROW("Table_Name",TABLE3,"Row_Count",TABLE3_COUNT)) |
If this helps, Mark it as a solution.
Kudos are nice too.
@VasTg thanks, it looks like it is exactly what I need.
But where should I enter this code?
"Enter Data"?
"New Source" ...?
Thank you!!
It worked. 😀
User | Count |
---|---|
84 | |
79 | |
71 | |
48 | |
43 |
User | Count |
---|---|
111 | |
54 | |
50 | |
40 | |
40 |