Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends
I have attached my Qv doc where I have created a pivot table showing data relating to Insurance Policies with Premium and claims paid. I want this pivot table to sort where row showing premium should come as 1st row whereas in my pivot table it is last row. Kindly help . My required output table is shown below.
Can someone pls help me with a solution
In a pivot table, the sort order is fixed to the dimension order. The null date will always sort to the bottom of LOSS_DATE, so we need to fix that with a calculated dimension that returns a value that will sort to the top. I used a dual to prevent this bogus value displaying:
=If(Len(LOSS_DATE) = 0, Dual('', MakeDate(1)), Date(LOSS_DATE))
This can then be sorted in ascending order. See the attached qvw file.
The calculated dimension could be simpler. This also works:
=If(Len(LOSS_DATE) = 0, Dual('', 0), Date(LOSS_DATE))
or even simpler:
=Alt(Date(LOSS_DATE), Dual('', 0))
Thanks Jonthy,
When I reload your attachment I get the following output.
Please look into this and help me.
Dear Jonty,
Could you help me please