Announcements
The way to achieve your own success is the willingness to help somebody else. Go for it!
cancel
Showing results for
Did you mean:  Contributor

## Multiple Number formats in pivot

Hi All,

Is it possible to have two number formats in a pivot?

For Example, the measure in my pivot is;

if(dimensionality() = 1
,(Sum(Aggr(If(sum([Output]) >= (sum(Plan)*.90) and sum([Output]) <= (sum(Plan)*1.10), 1, 0),[Month],Product,Category)))
/count(aggr(count(Product),[Month],Product,Category))

,if(dimensionality() = 2
,if(sum([Output])>= (sum(Plan)*.90) and sum([Output]) <= (sum(Plan)*1.10) ,1,0)
,0
)
)

I want the first dimension (Category) to be in % and the second dimension (Product) to be int (1 or 0).

I have tried to wrap the num function around the expressions but this doesnt seem to be working for me..

e.g Num(Expression,'#,##0%')

Any help would be much appreciated!

Thanks!

Labels (2)

• ### General Question

1 Solution

Accepted Solutions  MVP

May be try this

``````if(dimensionality() = 1
,(Num(Sum(Aggr(If(sum([Output]) >= (sum(Plan)*.90) and sum([Output]) <= (sum(Plan)*1.10), 1, 0),[Month],Product,Category)))
/count(aggr(count(Product),[Month],Product,Category)), '##.%')

,if(dimensionality() = 2
,Num(if(sum([Output])>= (sum(Plan)*.90) and sum([Output]) <= (sum(Plan)*1.10) ,1,0), '##.')
,0
)
)``````

Make sure to use Measure expression for Number Formatting within the properties of your Expression

2 Replies  MVP

May be try this

``````if(dimensionality() = 1
,(Num(Sum(Aggr(If(sum([Output]) >= (sum(Plan)*.90) and sum([Output]) <= (sum(Plan)*1.10), 1, 0),[Month],Product,Category)))
/count(aggr(count(Product),[Month],Product,Category)), '##.%')

,if(dimensionality() = 2
,Num(if(sum([Output])>= (sum(Plan)*.90) and sum([Output]) <= (sum(Plan)*1.10) ,1,0), '##.')
,0
)
)``````

Make sure to use Measure expression for Number Formatting within the properties of your Expression  Contributor
Author

Thank you! - Assigning the "measure expression" for number formatting did the trick. Tags
Community Browser