9 Replies Latest reply on Sep 10, 2016 9:09 AM by Rob Kime

# Create % using dynamic count of territories

I would like to turn the Above / Below value into a percentage. I have created calculated measures (I think) for the numerator "A" (Count of Territories above the parameter) and the denominator "B" (Total Number of Territories) as well as the final calculated value I want which is A / B for the % of territories that fall above or below the "Greater Than Sales" parameter. Hope this makes sense? Any suggestions are greatly appreciated!

Rob

• ###### 1. Re: Create % using dynamic count of territories

Hello Rob,

SUM(IF {FIXED [Territory] : SUM([Sales])} >=[Parameters].[Greater Than Sales]

THEN 1 ELSE 0 END) / COUNTD([Territory])

The result is 46.67% .

Regards.

• ###### 2. Re: Create % using dynamic count of territories

Hi Rob

Please find the solution attached (see sheet 3 and 4)

Best

Shriram Saxena

• ###### 3. Re: Create % using dynamic count of territories

Lei,

Thank you!

I am missing something here. I have replicated the formula but the result is not as expected.

As you can see my result is 1 or 0.

Where am I going wrong?

Rob

• ###### 4. Re: Create % using dynamic count of territories

Shriram,

Looks like I need to upgrade to a newer version of Tableau to open this file.

I will work on that.

Thank you!

Rob

• ###### 5. Re: Create % using dynamic count of territories

Hello Rob,

Sorry that there's some problem in the calculation.

I fixed it in the workbook.

Regards

• ###### 6. Re: Create % using dynamic count of territories

Hi Lei,

If the issue is solved.

Thanks

Best

Shriram Saxena

• ###### 7. Re: Create % using dynamic count of territories

Hello Shriram,

I'm not the original poster.

Let's wait for Rob's test result.

Regards

• ###### 8. Re: Create % using dynamic count of territories

Hi Lei,

Definitely !!

Best

Shriram Saxena

• ###### 9. Re: Create % using dynamic count of territories

Lei,

Rob