Sort Data Table

%3CLINGO-SUB%20id%3D%22lingo-sub-740275%22%20slang%3D%22en-US%22%3ESort%20Data%20Table%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-740275%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%3EI%20have%20a%20Data%20Table%20that%20pulls%20columns%20from%20my%20DataSouce.%20I%20want%20the%20user%20to%20be%20able%20to%20pull%20data%20by%20Quarter%20and%20Year%20using%202%20dropdowns.%20For%20example%2C%20if%20the%20user%20wanted%20to%20see%20all%20the%20data%20for%20Quarter%203%20of%202018%2C%20they%20would%20dropdown%20to%20Q3%20and%202018.%20I%20am%20able%20to%20sort%20by%20using%20just%20one%20dropdown%2C%20is%20there%20a%20way%20to%20sort%20using%202%20dropdowns%3F%20Thanks%20for%20any%20help!%3C%2FSPAN%3E%3CIMG%20src%3D%22https%3A%2F%2Fi.gyazo.com%2Fa64a0826f5a3f765e6c385e532b4ed71.png%22%20border%3D%220%22%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-740275%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EData%20Table%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerApps%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Esort%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-850473%22%20slang%3D%22en-US%22%3ERe%3A%20Sort%20Data%20Table%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-850473%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20Tim%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EDo%20you%20want%20to%20sort%20your%20data%20or%20filter%20your%20data%20using%20those%202%20dropdowns%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20you'd%20like%20to%20filter%20your%20data%20based%20on%20year%20and%20quarter%2C%20you%20can%20add%20another%20logical_test%20at%20the%20end%20of%20the%20filter%20(I%20made%20up%20the%20Column%20name%20and%20dropdown%20control%20name%2C%20you%20can%20change%20it)%3A%3CBR%20%2F%3E%3CFONT%20color%3D%22%23000000%22%3E%3CBR%20%2F%3ESortByColumns%3C%2FFONT%3E(Filter('%5Bdbo%5D.%5Bwynne_incidents%5D'%2C%20Yearadd.Selected.Result%20%3D%20year%2C%20%3CFONT%20color%3D%22%23FF6600%22%3EQuarterdd.Selected.Result%20%3D%20quarter%3C%2FFONT%3E)%2C%20%22incident_num%22%2C%20Ascending)%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1044363%22%20slang%3D%22en-US%22%3ERe%3A%20Sort%20Data%20Table%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1044363%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F238560%22%20target%3D%22_blank%22%3E%40Tim%20Hunter%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThis%20would%20seem%20to%20be%20a%20great%20place%20to%20embed%20a%20power%20bi%20tile.%20Just%20something%20to%20consider.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Super Contributor

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!

2 Replies

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)

@Tim Hunter 

 

This would seem to be a great place to embed a power bi tile. Just something to consider.