Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
m_mennen
Contributor
Contributor

Count total # (if not in selection) belonging to a specific case

Hello all,

I'm trying to calculate the total number of subscriptions (new and old) that belong to a relationship id if this relationship id has a new inflow subscription.

I want to make the following calculation:

Inflow CLV-value = (sum (CLV-value)) * (# inflow_relationship_ids# active subscriptions belonging to these relationship id's).

Where:

  • Each relationship has 1 CLV-value
  • One relationship id can have multiple subscriptons

  • Sum(Inflow CLV-value) = SUM({$<new_inflow_subscription={1}>} clv_value)
  • # inflow relationship_id = COUNT({$<new_inflow_subscritpion={1}>} distinct relationship_id)
  • # active subscriptions belonging to these relationship id's= ???


I cannot solve the problem of calculating the total # active subscriptions belonging to the inflow relationship ID's. Thus, if a relationship has a new inflow subscription in a certain week I need to count all the subscriptions that this specific relationship has (new inflow ids but also older already existing ones).

For example:

relationship x has a new inflow subscription in week y, namely subscription A. But relationship X is already active with 2 other subscriptions, namely subscription B and subscription C.

CLV of relationship x = 900€.

# Relationship = 1

# Subscriptions = 3

Then Inflow CLV-value = 900 * (1/3) = 300.

Any ideas?

Thanks! Minke

1 Reply
sunny_talwar

Not sure I completely understand... but may be you need this

COUNT({$<new_inflow_subscritpion={1}>} relationship_id)

or this

COUNT(TOTAL <relationship_id> {$<new_inflow_subscritpion={1}>} distinct relationship_id)