Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
scottwilcox
Contributor
Contributor

Two Dimentional Line Chart

I have a two dimensional line chart that shows residential housing sales by the way it was financed (cash, conv, etc). The chart is working with Group/Month and Line/Finance Code as the dimensions.  The measure (height of line) is the count of the different finance codes. I want to change the measure to the % of total finance codes per month. So Cash might be 15% and Conventional 70% and so on. 

I tried =count([Fin Type])/count(total([Fin Type])) but the returned values are too small. They may add up to 10%, not 100%

Any thoughts on the correct measure formula?

1 Solution

Accepted Solutions
anthonyj
Creator III
Creator III

Hi Scott,

The TOTAL key word tells Qlik to ignore all dimensions, so you need to tell it to not disregard the [Close Date] dimension when calculating the count. The way you do this is by adding the column name between < > after the TOTAL function.

count([Fin Code])/Count(total <[Close Date]> [Fin Code])

See the result and difference in the screen shot table below.

anthonyj_0-1627612633389.png

Hope this helps.

Thanks

View solution in original post

1 Reply
anthonyj
Creator III
Creator III

Hi Scott,

The TOTAL key word tells Qlik to ignore all dimensions, so you need to tell it to not disregard the [Close Date] dimension when calculating the count. The way you do this is by adding the column name between < > after the TOTAL function.

count([Fin Code])/Count(total <[Close Date]> [Fin Code])

See the result and difference in the screen shot table below.

anthonyj_0-1627612633389.png

Hope this helps.

Thanks