Sorry @v-siky-msft for not replying earlier as I got caught up in other stuff.
This is how the formulas work
I select employee details in dropdown 1. It filters the value from sharepoint list. Formula - Sort(ShowColumns(Survey,"Name", "ID"),Name,Ascending)

Each employee has filled up a multiple choice survey questionnaire. These multiple choice answers are used to get the calculate value in vertical gallery also displayed from the same SharePoint list.
To convert multiple choice into a label inside gallery I am using following formula
lblTopicsSelected - Concat(ThisItem.TopicsSelected.Value,Concatenate(Text(Value),""))
As there are 18 multiple choice options, I am using following formula to calculate if any of the following value is present
lblItem1 = If("ABC" in lblTopicsSelected .Text,1,0)
lblItem2 = If("DEF" in lblTopicsSelected .Text,1,0)
lblItem3 = If("GHI" in lblTopicsSelected .Text,1,0)
.
.
.
lblItem16 = If("XYZ" in lblTopicsSelected .Text,1,0)
I am calculating the sum of these individual lblItems by using
lblTotalSum = Sum(Value(lblItem1.Text), Value(lblItem2.Text),..........,Value(lblItem16.Text)
From employeedropdown selection, I am calculating a similar value (not inside gallery) lblTotalEmployeeValue
Now the final matching value is calculated as in another label.
lblFinalValue = (Value(lblTotalSum.Text)/Value(lblTotalEmployeeValue.Text)) *100. This is calculated for each gallery row. I want to sort the gallery based on this lblFinalValue being displayed but getting circular reference error.