Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Mathias
Partner - Contributor II
Partner - Contributor II

Count games

Hello everyone,

so...

Fact Table:

Knipsel.PNG

Dim Home_team

Knipsel.PNG

Dim Away_team

Knipsel.PNG

And a variable value team_select="Team 2"

I want a KPI that represents how many times that Team 2 played "home" and a KPI that represents how many times that Team 2 played "away". What is the Expression that I have to use?

Thanks!

2 Replies
sunny_talwar
MVP
MVP

May be this

Times Team 2 played "home"

Count({<home_team_id = {2}>}ID)

Times Team 2 played "away"

Count({<away_team_id = {2}>}ID)

Mathias
Partner - Contributor II
Partner - Contributor II
Author

I have to do it with the variable because It is possible to change the variable in the app