8 Replies Latest reply on Jul 20, 2016 10:02 AM by Mahfooj Khan

# Calculating values across metrics

I have number of metrics (columns) listed for several
facilities (rows). The resulting horizontal bar chart is fine. Now I need to
divide the values of one metric value’s (unique patients Admitted)  by  another metric value’s  (Licensed Beds)  to get a new
column (the percentage) and display . I’ve tried a lot things with calculations but I can’t seem to write a calculation that gets at the metrics.

• ###### 1. Re: Calculating values across metrics

You can try something like this

Percentage Value:

SUM(IF [Metric]='unique patients Admitted' THEN [Result_value] END)/SUM(IF [Metric]='Licensed Beds' THEN [Result_value] END)

It will be more helpful If you share some sample data. So that we can create a sample workbook for you.

Let me know If this help.

Mahfooj

• ###### 2. Re: Calculating values across metrics

SUM(IF Metric = 'Unique Patients Admitted' then RESULT_VALUE END)

/

SUM(IF Metric = 'Licensed Beds' then RESULT_VALUE END)

• ###### 3. Re: Calculating values across metrics

Yup, the calculation is good, but how do I use it as a new metric? When I drag the calculation to the columns I get:

I need it to be another metric.

Thanks,

• ###### 4. Re: Calculating values across metrics

Another 'metric' as in it needs to appear within your 'Metric' dimension?

That won't be possible. You'll need to pre-calculate it in your datasource so the data already exists. You're effectively asking to create fake data within a dimension and unfortunately it isn't possible.

• ###### 5. Re: Calculating values across metrics

Format the Calculation1 measure from automatic to percentage.

Drag measure name in columns shelf and measure values on labels and filter the measure only select Result value and Calculation1.

• ###### 6. Re: Calculating values across metrics

Unfortunately I see your point. But will try what is suggested in the post below

• ###### 7. Re: Calculating values across metrics

I tried and ended up with this:

It seems the new measure is a mirror of the metric.

• ###### 8. Re: Calculating values across metrics

Put filter on measure names only select those measures which you wants to show in your viz. And remove the result_values measure from columns shelf.