lookup column filter

%3CLINGO-SUB%20id%3D%22lingo-sub-895374%22%20slang%3D%22en-US%22%3Elookup%20column%20filter%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-895374%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20want%20to%20'Distinct'%20a%20lookup%20column%20from%20'list2'%20in%20a%20list%20('list1')%20form%20to%20avoid%20the%20repetitive%20data%20showing.%20I%20did%20this%3A%3C%2FP%3E%3CP%3Emade%20a%20dropdown%2Fcombobox%2Fdatacardvalue%20and%20use%20the%20code%20below%3A%3CBR%20%2F%3EDistinct('list1'%2Clookup%20column)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebut%20nothing%20showed%20on%20the%20powerapps%20form%20of%20my%20list1.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-895374%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAdmin%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EDeveloper%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ELists%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerApps%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3ESharePoint%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-895412%22%20slang%3D%22en-US%22%3ERe%3A%20lookup%20column%20filter%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-895412%22%20slang%3D%22en-US%22%3ETry%20distinct(list1%2Clookupcolumn.value)%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-895419%22%20slang%3D%22en-US%22%3ERe%3A%20lookup%20column%20filter%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-895419%22%20slang%3D%22en-US%22%3E%3CP%3Enothings%20happend%2C%20actually%20I%20want%20to%20do%20it%20on%20list1%20values%20to%20choose%20from%20not%20records.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-895893%22%20slang%3D%22en-US%22%3ERe%3A%20lookup%20column%20filter%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-895893%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F373287%22%20target%3D%22_blank%22%3E%40Soheilsd%3C%2FA%3E%26nbsp%3B%2C%20try%20a%20combobox%20and%20set%20the%20items%20to%20Distinct('list1'%2CColumnNameHere).%26nbsp%3B%20This%20will%20create%20a%20single%20column%20table%20and%20the%20only%20column%20will%20be%20%22Result%22%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20that%20isn't%20clear%2C%20try%20adding%20a%20button%20and%20set%20the%20OnSelect%20property%20to%20ClearCollect(col_Test%2CDistinct('list1'%2CColumnNameHere))%20.%26nbsp%3B%20This%20will%20allow%20you%20to%20preview%20your%20col_Test%20under%20View-%26gt%3B%20Collections%20and%20will%20show%20you%20the%20first%20five%20rows%20of%20the%20collection.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20post%20a%20screenshot%20if%20you're%20able%20and%20need%20further%20assistance.%20It%20will%20help%20immensely%20in%20understanding%20what%20you're%20seeing.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi,

I want to 'Distinct' a lookup column from 'list2' in a list ('list1') form to avoid the repetitive data showing. I did this:

made a dropdown/combobox/datacardvalue and use the code below:
Distinct('list1',lookup column)

 

but nothing showed on the powerapps form of my list1.

3 Replies
Try distinct(list1,lookupcolumn.value)

nothings happend, actually I want to do it on list1 values to choose from not records.

@Soheilsd , try a combobox and set the items to Distinct('list1',ColumnNameHere).  This will create a single column table and the only column will be "Result"

 

If that isn't clear, try adding a button and set the OnSelect property to ClearCollect(col_Test,Distinct('list1',ColumnNameHere)) .  This will allow you to preview your col_Test under View-> Collections and will show you the first five rows of the collection.

 

Please post a screenshot if you're able and need further assistance. It will help immensely in understanding what you're seeing.