Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Trying to figure out how to do the following. Am calculating the percentage of readmissions to the hospital within 30 days by primary diagnosis and showing them as a percentage of all readmissions.
In this pop of 150,000 there were 3,989 readmissions out of a total of 66,496 admits. If I create the following expression
=num(Count ( {$<Pat_Had_Readmit={'Yes'}>}Distinct conf_num) / 3989,'###.#%')
I get the correct percentage and if I click on one of the diagnoses it correctly calculates the percentage of the total.
BUT .... this is across the entire USA. I also have a multibox where you can filter on a number of different parameters, one of which is by State. I want the same logic to occur and correctly calculate the totals and the percentage for any State that is chosen. Obviously plugging the 3989 into this does not work as it calculates the percentage for the entire country.
I have tried a number of things including:
=num(Count ( {$<Pat_Had_Readmit={'Yes'}>}Distinct conf_num) / Count ( {$<Pat_Had_Readmit={'Yes'}>}Distinct conf_num),'###.#%')
Here, since the numerator and denominator are identical this always yields 100% even though it is accurately counting the readmits by State when State is chosen. I have not been able to figure out how to get the State in there.
I think I either need to create the denominator as a constant or somehow include the logic that the State is part of the equation. But I do NOT want to have to specify a State. I want the default value and view to always be the whole country. Since there are 50 states, DC, and a couple of territories I need to be able to create something that creates the default view of everything, but still allows the drill down when a State/Territory is chosen. The actual value being used is StateAbbre.
Ideas?
I changed the approach and embedded the percent breakdown of the readmits by diagnosis in the chart and changed the text box to the total cost. A little different approach but it accomplished what I needed it to show.
Just out of curiosity, how have you changed the chart expression to show the percentage then?
And if you say 'it's not working', could you be a bit more detailed?
To debug things, it's usually a good thing to start with multiple expressions, that show the nominator and denominator in different columns.
Or maybe I am still misunderstanding your setting, and you are not looking for a percentage breakdown in the chart with dimension diagnosis?