SOLVED

Even with relationship, pibot table field always shows SUM

Copper Contributor

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 : 

Screenshot_1.png

 

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 :

 

HOSTNB_CPURAMRAM_USED
batchs2101139847712892
cms1139169003558896
cms2139241962572340

 

 

Table tomcat :

 

HOSTTOMCATXMXXMSPERMGENJMX_PORT
batchstomcat21512m512m256m9210
batchstomcat70512m512m256m9700
cms1tomcat25512m512m256m9250
5 Replies

@karvMe 

Could you provide small sample of source data (few records for each table is enough) ?

I've added it in the end of my post.
best response confirmed by karvMe (Copper Contributor)
Solution

@karvMe 

See it, thank you.

So, we add both Hosts and Tomcat tables to data model and create relationship:

image.png

image.png

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

image.png

Please see in attached file

 

 

1 best response

Accepted Solutions
best response confirmed by karvMe (Copper Contributor)
Solution

@karvMe 

See it, thank you.

So, we add both Hosts and Tomcat tables to data model and create relationship:

image.png

image.png

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

image.png

Please see in attached file

 

 

View solution in original post