5 Replies Latest reply on May 17, 2016 7:59 AM by Yuriy Fal

    How to pass a value from a filtered table row into a string

    Chris Wragge

      Hi there,

      My question is as follows: Suppose I have a table in my dashboard where I have 2 fields

      Date
      Amount
      1/1/16$32,500
      1/1/16$40,000
      1/1/16$20,000
      2/1/16$50,000
      2/1/16$50,000

       

      When I click on any item in the table, I would like a string at the top to display the rank of the amount and the total number of rows in my table as well as my filtered Amount. For example, if I clicked on the first row, my string would display '$32,500: Ranked 4 out of 5'. I would also need the implementation to be dynamic, so as when I filter on date, the result would adjust to suit e.g. if I filtered the date to 1/1/16 and reclicked on the first row, the string would be '$32,500: Ranked 2 out of 3'.

      I can get this dynamic rank to display correctly as a column in my table using a Calculated Field (Calculation1) with the formula RANK(SUM([Amount]),'desc') and compute using Table(down). I can also get the count to display correctly using the formula WINDOW_MAX([Calculation1]), also computed using Table(down).

      Where I am stuck is passing this value into a string. I tried the approach of creating a separate 1x1 table that filtered the row based on my main table, but it always showed Ranked 1 out of 1 as the rank function only computed based on the filtered partition.

       

      Can anyone assist?

       

      Thanks

      Chris