Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am having trouble creating a table in qliksense expressed in percentages. My raw data are like the following:
YEAR | NUM | NAME | NEW | AGE |
2017 | 1 | JOHN | YES | 0-2 |
2017 | 2 | JOHN | NO | 3-5 |
2019 | 1 | ROBERT | YES | 6-10 |
2017 | 1 | CLAIRE | NO | 11-17 |
2016 | 1 | ALEX | YES | 0-2 |
2016 | 3 | JULIA | NO | 3-5 |
I want to create a table that shows the number of new people per year among the different ages, both in absolute values and in percentage (of the total new students of each year). I am using the following code to calculate the absolute value
Count(IF(NUM=1 and [NEW STUDENT]='YES', ((NAME))))
But I am really having trouble to calculate the same value in percentage. I studied the function TOTAL, but it does not work with IFS, so i tried with something like this after navigating on different forums
Count(IF(NUM=1 and [NEW STUDENT]='YES', ((NAME)))) / Count(TOTAL {<[NEW STUDENT] = {'YES'}>} {<[NUM] = {1}>} NAME)
But It's still not it and I am missing something in the logic.
Perhaps like this:
Dimension: YEAR
Measure: Count({<NEW={1}>} NAME) / Count(NAME)
Not sure what the NUM field means and what uniquely identifies a person.