Mar 28 2023 07:58 AM - edited Mar 31 2023 02:18 AM
I'm trying to create a pivot table from two tables.
The first table (Table1) has a unique column "HOST" and informations about that host
and the second (Table2) has the same column but with duplicates and has informations about the contents of the host. One of thos column is called "tomcat"
What I want is to create a dynamic pivot table to show for every "tomcat" has how much "hosts" and for every host show how much ram it has.
Example :
but As u see here Ram column has the same value everywhere.
I created relationships between the two tables, I added a bridge table, ... nothing works.
EDIT :
Table Hosts :
HOST | NB_CPU | RAM | RAM_USED |
batchs | 2 | 10113984 | 7712892 |
cms1 | 1 | 3916900 | 3558896 |
cms2 | 1 | 3924196 | 2572340 |
Table tomcat :
HOST | TOMCAT | XMX | XMS | PERMGEN | JMX_PORT |
batchs | tomcat21 | 512m | 512m | 256m | 9210 |
batchs | tomcat70 | 512m | 512m | 256m | 9700 |
cms1 | tomcat25 | 512m | 512m | 256m | 9250 |
Mar 28 2023 02:28 PM
Could you provide small sample of source data (few records for each table is enough) ?
Mar 29 2023 12:49 AM
Mar 30 2023 10:19 AM
Where is it?
Mar 31 2023 02:18 AM
Mar 31 2023 07:50 AM
SolutionSee it, thank you.
So, we add both Hosts and Tomcat tables to data model and create relationship:
To calculate from many-to-one we may create the measure for RAM available
tomcat ram:=CALCULATE( SUM( Hosts[RAM] ), CROSSFILTER( Hosts[HOST], tomcat[HOST], Both ) )
and create PivotTable from data model
Please see in attached file