5 Replies Latest reply on Jun 13, 2012 2:45 AM by Jonathan Drummey

# how to divide two measures to get percentage

Hello,

WHY is it so hard to divide 2 measures to give me a percent?

I have two measures, [goals] and [running total of passing]

goals:

[Week] * 2175/52

running total of passing:

IF ATTR([Week]) < ATTR([Nextweek]) THEN

RUNNING_SUM(SUM([Passing]))

END

I have the ATTR([Week]) < ATTR([Nextweek]) so the viz doesnt calculate values for the future.

What I am trying to do is divide the running total of passing with the goal to get a percent to goal.

ANY combination of attr or discrete etc gives me a null value...

any help would be much appreciated.

Regards,

Hub

• ###### 1. Re: how to divide two measures to get percentage

Hi Hub,

Would you be able to post the workbook (twbx file) so I can get a better understanding of the fields, etc?

-Tracy

• ###### 2. Re: how to divide two measures to get percentage

Hi Tracy.. Thanks for helping me again. This is actually a continuation of something you helped me with before. Here you go. I am specifically looking to see what the current percent to goal is. Thank you

tried to get rid of the zip file... Message was edited by: Hub Yoo

• ###### 3. Re: how to divide two measures to get percentage

Hi Hub,

I took a quick look at this...when you are using data blending, calculations (particularly table calculations) quickly get tricky because what they operate over changes depending on the linking fields in the blend.

However, I think in your case the issue is that Goals is a non-aggregated field, so I created a % to Goals field in the primary with the following formula:

[Sheet1 (hex.xlsx)].[Running Sum of Passing]/SUM([Goals])

Then that can be part of the view. Does that help?

Jonathan

• ###### 4. Re: how to divide two measures to get percentage

Thanks for the followup Jonathan. The numbers are all skewed on the version you gave me and very confusing as to why. but no need to follow up. going to just say it is impossible haha.. sigh.

• ###### 5. Re: how to divide two measures to get percentage

I'm sorry this didn't work out for you!