Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
eromiyasimon
Creator II
Creator II

Partial sum based on rank

i have attached a QVD (kindly refer it ) in that i want to display the rank for top 5 and followed and partial sum for both and sum for others

input

and i want to display like this

(made using excel)

thank you in advance

1 Solution

Accepted Solutions
sunny_talwar

Further enhancements

Capture.PNG

View solution in original post

7 Replies
sunny_talwar

Something like this?

Capture.PNG

eromiyasimon
Creator II
Creator II
Author

yes like that only, but here in your result i can see the order of the rank has been changed also i want to display the rank in one column as i shown in excel screenshot

sunny_talwar

Here you go

Capture.PNG

sunny_talwar

Further enhancements

Capture.PNG

eromiyasimon
Creator II
Creator II
Author

It Worked,


at first thanks a lot,

No one cannot unveil this type of riddle, unless its Sunny,


i replaced my column names in that query and its worked like charm,


but it will take some decades to understand whats going on inside that query,


its not a query its sorcery.


Many thanks

eromiyasimon
Creator II
Creator II
Author

Hi sunny everything fine for the values i gave but i have to get some for an another column which is showing the same sum for every 5

attached the file and Screen shot for reference,

kindly help this out to find, thank you in advance

in this i want the sum of s2 column to be proper for every 5

sunny_talwar

This?

Capture.PNG

Expression:

Pick(Dim,

Sum(s2),

Sum({<Name = {"=Rank(Sum(Sales)/Sum(TOTAL Sales)) < 6"}>} s2),

Sum(s2),

Sum({<Name = {"=Rank(Sum(Sales)/Sum(TOTAL Sales)) >= 6 and Rank(Sum(Sales)/Sum(TOTAL Sales)) < 11"}>} s2),

Sum({<Name = {"=Rank(Sum(Sales)/Sum(TOTAL Sales)) >= 11"}>} s2))