Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
p0cket0m
Contributor III
Contributor III

How to sort a dimension by highest revenue using Dual?

I have a dimension called BusinessDivision which is used in a filter pane. 

p0cket0m_0-1692182514499.png

I want to display the values by highest revenue first, those should be on top of the filter list.

I tried

 

 

=dual(BusinessDivision, rank(sum(Revenue)))

 

 

but while the formula editor says its ok, in the filter pane I get 'Invalid dimension' error.

 

What am I doing wrong?

Labels (1)
  • SaaS

1 Solution

Accepted Solutions
salonicdk28
Creator II
Creator II

Use aggr in your dual expression -

=aggr(dual(BusinessDivision,rank(sum(Revenue)),BusinessDivision)

View solution in original post

5 Replies
salonicdk28
Creator II
Creator II

Hi,

Can you try sorting  by expression in that dimension field filter pane and in expression write sum(Revenue) and then see if it works

Thanks,

Saloni

salonicdk28
Creator II
Creator II

Hi,

Can you try sorting  by expression in that dimension field filter pane and in expression write sum(Revenue) and then see if it works

Thanks,

Saloni

p0cket0m
Contributor III
Contributor III
Author

Hi Saloni,

Thanks for your fast reply. Sorting by expression with sum formula works 😊

But how would it work with a master-dimension and using dual? That way would be better because our worksheet designers then dont need to think about it everytime they use it. It would sort always by revenue with automatic sorting.

salonicdk28
Creator II
Creator II

Use aggr in your dual expression -

=aggr(dual(BusinessDivision,rank(sum(Revenue)),BusinessDivision)

p0cket0m
Contributor III
Contributor III
Author

This is exactly what I was looking for.


Thanks!