Skip to main content
Solved

Activity count and Connection count in one OLAP table

  • July 14, 2022
  • 4 replies
  • 11 views

Dear Community,

 

I'd like to make a OLAP table that have Activity count and Connection count.

 

olaptable 

Is there any way to make this OLAP table?

 

Thank you.

 

Best regards,

Takayoshi Ichikawa

 

Best answer by david.beche12

Hi @takayoshi.ichik ,

 

I assume you already have the OLAP table with the connections using SOURCE/TARGET.

You should be able to add the "Source Activity Count" using a PU_COUNT together with DOMAIN_TABLE. It would look like this:

 

PU_COUNT(DOMAIN_TABLE(SOURCE("Activities"."Activity")), SOURCE("Activities"."Activity"))

 

The "Target Activity Count" can be calculated accordingly:

 

PU_COUNT(DOMAIN_TABLE(TARGET("Activities"."Activity")), TARGET("Activities"."Activity"))

 

 

Hope this helps!

 

Best,

David

4 replies

  • Level 8
  • 28 replies
  • July 18, 2022

Which data do you have?


  • Author
  • Level 3
  • 6 replies
  • July 19, 2022

Hello Nihat,

 

Upper-left table in screenshot above is activity data.

 


Forum|alt.badge.img+2
  • Level 1
  • 240 replies
  • Answer
  • July 27, 2022

Hi @takayoshi.ichik ,

 

I assume you already have the OLAP table with the connections using SOURCE/TARGET.

You should be able to add the "Source Activity Count" using a PU_COUNT together with DOMAIN_TABLE. It would look like this:

 

PU_COUNT(DOMAIN_TABLE(SOURCE("Activities"."Activity")), SOURCE("Activities"."Activity"))

 

The "Target Activity Count" can be calculated accordingly:

 

PU_COUNT(DOMAIN_TABLE(TARGET("Activities"."Activity")), TARGET("Activities"."Activity"))

 

 

Hope this helps!

 

Best,

David


  • Author
  • Level 3
  • 6 replies
  • July 29, 2022

Hi David,

 

Thank you.

With the PQL you offer, I was able to get the number I want.

I really appreciate it.

 

Best regards,

Takayoshi Ichikawa