Quantcast
Viewing all articles
Browse latest Browse all 2067

Re: Understanding of Rank Function in Webi Report

Hello Shesidher,

 

I would like to point out that when doing Rank we require some measure value to be ranked based on some dimensions. The SQL that you have posted is correct but is missing some part of Select Statement which would be somewhat like below

 

Select Dimension1,Dimension2, Measure1

Rank() over(partitionbyDimension1,Dimension2orderbyDimension3asc,Dimension4 desc,Dimension5desc

From TableName



So you see in the Select clause of the SQL we have to specify a measure for which the SQL Engine will designate the Rank based on measure Value else it will be meaningless.


Now coming to your questions I guess first one is answered for the other one the list of dimension on which a measure is ranked by is shown in the highlighted part of the below code.


=Rank([Revenue];([Country];[State]);Top)


so here the Revenue will be ranked based on Country and State and for the Order by you can go to block and apply the Sorting desired in your requirement.


Hope I was able to explain.


Regards

Niraj


Viewing all articles
Browse latest Browse all 2067

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>