I am looking to create a chart that shows a sum of a column (points) in descending order.
Answers
-
Hi @dsporleder
The problem you are facing is that you can not sort a report based on the summary result.
Here is a workaround.
Suppose we have a Sitecode points sheet on the lower left.
First, I created a metrics sheet on the lower right with the following formula.
[Row] - Number starting from 1, incrementing by 1, upto a necessary number.
[Site Code] =IFERROR(INDEX(DISTINCT({Sitecode}), Row@row ), "")
[Points] =SUMIF({Sitecode}, [Site Code]@row , {Points})
[RANKEQ] =RANKEQ(Points@row , Points:Points)Second, using the RANKEQ value in the first sheet, I created a second sheet on the upper right with the following formula, reordering the rows accordingly.
[Row] - Number starting from 1, incrementing by 1, upto a necessary number.
[Site Code] =JOIN(COLLECT({Sitecode points metrics sheet : Site Code}, {Sitecode points metrics sheet : RANKEQ}, Row@row ))
[Points] =VALUE(JOIN(COLLECT({Sitecode points metrics sheet : Points}, {Sitecode points metrics sheet : Site Code}, [Site Code]@row )))Using the second sheet, I created a chart that shows the sum of a column (points) in descending order.
-
You don't need the RANKQ or a third sheet with formulas. Just use a report looking at the first metrics sheet and sort by the [Points] column.