title: Sorting function for multiple measures in QlikSense
body: <p>Hi for starters i'm new to QlikSense and QlikView.
  I am trying to display dynamic charts that changes based on measure sorted in a descending order (On user click it changes based on the measure). Does anyone know the function for sorting a dynamic chart? 
  Edit: my chart is bar chart that has a measure and alternative measure</p>
  
  <p>I have tried running a count function to sort but it will only sort one chart. some thing like if user clicked on chart X to be displayed then sort by X function, if user clicked on chart Y to be displayed then sort by Y function.</p>
  
  <p>my expression logic:
  if(LabelName = label_name then count(X) else count(Y))</p>
  
  <p>Any tips and tricks are appreciated.</p>