Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I want to calculate the monthly loss ratios using data from the following table.
Scheme | Month | Claims | Premiums |
Bronze | 2 | 23 | 50 |
Silver | 3 | 45 | 80 |
Gold | 3 | 32 | 75 |
Bronze | 2 | 67 | 100 |
Silver | 8 | 23 | 90 |
Gold | 3 | 68 | 120 |
I want to create a straight table that looks like the following loss ratios:
Scheme | January | February | March |
Bronze | 0 | 60 | 0 |
Silver | 0 | 0 | 56.25 |
Gold | 0 | 0 | 114.94 |
In the Dimensions, I have selected the 'Scheme' and in the Expression tab, I tried to calculate for month 2 using the following formula:
=if(Month=2, sum(Claims)/sum(Premiums)*100, 0)
This is producing wrong results. Please help..
load the table as
LOAD Scheme, Month, Claims, Premiums, MONTH(date#(Month,'MM')) as month_name FROM
table...........
Add a pivot table
dimensions1 - Schemes
dimension2 -Month name
expression
sum(Claims)/sum(Premiums)*100
You may need to drag the column horizontally in Qlikview