Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I have this IF statement- If([SERVICE LINE]='PF HOSPITALIST', sum(CASES), sum([ADJSTD CASES]))
How can I take the % of total of the IF statement? Do I have to enter this into the script or is there something I can do in the chart type.
So it would read Sum(IF statement)/ Sum( Total IF Statement).
Thanks,
EK
In some chart types you can check the Relative option for the expression. That should give you the percentages of the total. This is not possible in pivot tables.
Right..pivot table is the chart type I need for this...
Of course you do. People always need the most bothersome option available.
Maybe like this then:
If([SERVICE LINE]='PF HOSPITALIST', sum(CASES), sum([ADJSTD CASES])) / (sum({<[SERVICE LINE]={'PF HOSPITALIST'}>} total CASES) + sum({<[SERVICE LINE]-={'PF HOSPITALIST'}>} total ADJSTD CASES))
I try to be difficult . So close! The formula doesn't like the -= sign so anytime a selection is made when I need to use ADJSTD CASES the % is incorrect.
That's a bug in the editor. The -= is correct syntax.
Yea I know sometimes the syntax after will be underlined in red but the formula will work correctly. In this case though when no selections are made it shows 57% as total when it should be 100%. Anytime a selection is made when it is suming ADJSTD CASES it is incorrect. When it is suming CASES it is correct.