Forum Discussion

MOHI's avatar
MOHI
Frequent Visitor
2 years ago
Solved

How to sort a slicer dynamically

Hi Team,

We have a slicer(Inventory) and want to sort this based on a meausre(Total Volume of Inventory). 

I tried to sort this by Volume Column in column tools but thats not working and I downloaded custom slicer from more visual section but thats not ideal.

Your help will be appreciated.

Thanks,
Moh

8 Replies

  • MOHI based on your question, seems like you have volume as a column in the table that you want to use for the sorting, correct?

     

    2nd question, you want to sort products based on the volume, correct?

     

     

     

  • MOHI Just realized volume is a measure. 

     

    Let me ask a different question, What is the volume measure? and what you want to sort? There could be a potential solution (convoluted one) but need to understand it a bit more.

    • MOHI's avatar
      MOHI
      Frequent Visitor

      Hi parry2k ,

      Thanks for your reply,

      So I got 1 "Products" column and there is 2 coumn "Quantity" call it volume.

      I want Products in Slicer according to the number of sales in 2 clumn. I tried column sorting based on quantity column but didnt work and I tried calculated quantity column which is giving circular depencies error.

      Yes I want to sort products in slicer based on quantity.

      Thanks for your help.

  • MOHI question, Why in your post you mentioned sorting based on a measure?

     

    2nd, what happens if you try to sort it by quantity? What message/error you are getting?

    • MOHI's avatar
      MOHI
      Frequent Visitor

      Hi parry2k ,

      So first I was only trying to sort with measure but in the way I got calculated column aswell. 
      My goal is to sort slicer either way,

      It doesnt allow anyway based on measure, when I try to sort with calculated column it gave me "circular depency error" because I used products column in calculated quantity column.

      Do you see  any solution here.

      Thanks

  • MOHI I see why you are getting error, what you mean by this:

     I used products column in calculated quantity column.

     

    Please provide as much information as possible otherwise we will be wasting each other's time.

    • MOHI's avatar
      MOHI
      Frequent Visitor

      OKAY Im going to explain everything here and see if it makes sense, Sorry for my ambiguous information.

      FROM whole dataset we got two columns and I'm developing a dashboard
      Here I'm selecting PART_NO in slicer and its 700+ parts. I'm trying to sort this slicer based on INVOICED_QTY. 

      I tried to sort through coumn sorting but I didnt work... (getting PART_NO repeated in slicer)

      Then I used  calculated coulmn for to get the sum of INVOICED_QTY for each PART_NO


      Volumeee =
      VAR THISPART = [PART_NO]
      RETURN
      CALCULATE(
          SUM('All'[INVOICED_QTY]),
          ALL('ALL'),
          'All'[PART_NO] = THISPART
      )

      And tried to sort through this calculated column but that giving me "circular depency error" because I used PART_NO coulmn in calculated column.

      Meausure is there which I used this to calculate sum of INVOICED_QTY but its not helpful to sort slicer.

      Thats the whole info I got here.
      My question is
      Is there anyway to sort slicer through DAX or someother way to acheive this above goal?

      Thank you for your time.