Forum Discussion

Tim Hunter's avatar
Tim Hunter
Steel Contributor
Jul 05, 2019

Sort Data Table

I have a Data Table that pulls columns from my DataSouce. I want the user to be able to pull data by Quarter and Year using 2 dropdowns. For example, if the user wanted to see all the data for Quarter 3 of 2018, they would dropdown to Q3 and 2018. I am able to sort by using just one dropdown, is there a way to sort using 2 dropdowns? Thanks for any help!

  • WinfredLiu's avatar
    WinfredLiu
    Brass Contributor

    Hi Tim

     

    Do you want to sort your data or filter your data using those 2 dropdowns?

     

    If you'd like to filter your data based on year and quarter, you can add another logical_test at the end of the filter (I made up the Column name and dropdown control name, you can change it):

    SortByColumns
    (Filter('[dbo].[wynne_incidents]', Yearadd.Selected.Result = year, Quarterdd.Selected.Result = quarter), "incident_num", Ascending)

Resources