Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have two expressions:
count({<RECORD_TYPE={'HIRE'}>} BUSINESS_UNIT)
and
count({<RECORD_TYPE={'HEAD_COUNT'}>} BUSINESS_UNIT)
I want to divide the number of people hired by the head count and put this into a chart. How can I achieve this?
Do like this
count({<RECORD_TYPE={'HIRE'}>} BUSINESS_UNIT)
/
count({<RECORD_TYPE={'HEAD_COUNT'}>} BUSINESS_UNIT)
May be this?
= count({<RECORD_TYPE={'HIRE'}>} BUSINESS_UNIT)/count(TOTAL {<RECORD_TYPE={'HEAD_COUNT'}>} BUSINESS_UNIT)
What out put you need can you share some sample here.
Thank you but how do I get the expression to print out as a percentage?
You can try this way for percentage display
NUM((count({<RECORD_TYPE={'HIRE'}>} BUSINESS_UNIT)
/
count(TOTAL {<RECORD_TYPE={'HEAD_COUNT'}>} BUSINESS_UNIT)),'#,##0%')
Or
NUM((count({<RECORD_TYPE={'HIRE'}>} BUSINESS_UNIT)
/
count( {<RECORD_TYPE={'HEAD_COUNT'}>} BUSINESS_UNIT)),'#,##0%')
Use the Num() function as mentioned by Anand. Or you can use Number format from the Number tab of your chart properties. Like.
To get the value to display as a percentage, you can use the Number format pane to format as Pct. Alternatively (like when you don't have a Number dialog) you can wrap the expression in a num() function to format.
num(
count({<RECORD_TYPE={'HIRE'}>} BUSINESS_UNIT)
/ count(TOTAL {<RECORD_TYPE={'HEAD_COUNT'}>} BUSINESS_UNIT)
,'0.0%')
The num() function supplies a format pattern describing how the value should be formatted for display.
-Rob