Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I saw a webpage teaching how to customize Qlikview Subtotal. However, I had a problem changing the number format. Let's look at this example:
There are 12 players in the game. Some players earn 1-point and some earn 0.5 point.
And in each sub-total, I want to calculate the total no. of players and total points the players earned.
Let's say I want the subtotal in country level, "No. of Players in Country" and "Total Points in Country" (as shown on the graph above)
To do this,
First, I created a dimension called "No. of Players in Country"
Then, I checked the Partial Sums and rename as "Total Points in Country"
Finally, in the Expression, to make a correct calculation of "Total Points in Country", I use:
if(Dimensionality()=1, count({<PlayerType={'1-Point'}>} ID)+ count({<PlayerType={'0.5-Point'}>} ID)/2, count(ID))
Then, the question comes, I want the whole row of "Total Points in Country" presented as 1 decimal point place. e.g. 0 --> 0.0, 1-->1.0
When I tried:
if(Dimensionality()=1, num(count({<PlayerType={'1-Point'}>} ID)+ count({<PlayerType={'0.5-Point'}>} ID)/2,'###0.0'), count(ID))
it doesn't work. (See graph shown below)
Hope someone could help. Thanks.
Thanks again amars.
I can't open your attached file above because I'm still using Personal Edition.
Can you do me a favor that print a screen to show the location that you put the formula?
I tried to put this formula in the Expression, and it doesn't work.
Maybe I put in a wrong position.
Don't understand why my Qlikview can't do it with the same input.
Anyways, thank you very much!