Prevent duplicates in list (virtual column type list)

Hi! Is there a way to prevent duplicates in a virtual column type list? I would like to prevent duplicates just in the current order, (If I already picked apple, I should not add apple again?)
Thanks

Solved Solved
0 7 383
1 ACCEPTED SOLUTION

I belive that Order Details column is a reverse-ref (isPartOf property of your Ref set to TRUE). If so;
you can set a valid_if expression in your child table for that [Fruit] column. Please make necessary changes in the expression to fit in your table schema.

COUNT(
    SELECT(
        Orders[Fruit],
        AND(
            [_THISROW].[Fruit] = [Fruit],
            [_THISROW].[RefColName] = [RefColName]
        )
    )
) = 0

View solution in original post

7 REPLIES 7

I belive that Order Details column is a reverse-ref (isPartOf property of your Ref set to TRUE). If so;
you can set a valid_if expression in your child table for that [Fruit] column. Please make necessary changes in the expression to fit in your table schema.

COUNT(
    SELECT(
        Orders[Fruit],
        AND(
            [_THISROW].[Fruit] = [Fruit],
            [_THISROW].[RefColName] = [RefColName]
        )
    )
) = 0

Thanks, I think it will be the solution, but I donโ€™t know where my mistake is. If I understand, It will count Product (fruit) in Orders, but in my Orders table I donโ€™t have a Product Column.

3X_5_d_5dc0e63a7d883a6fdccbe04e6963d6fdaa8feabb.png

Yeah, It works! thanks

Youโ€™re welcome

hi bro, can you share how to enter the formula? I have the same problem as you, but Iโ€™m still confused to solve it

This an old topic. Please start a new topic with a detailed explanation of your problem.

hi steve, can you help me, I want to filter the order details to remove duplicates in the [menu id] column, can it be done?
3X_a_e_aeb85af85957d2dc86017fe87381ba4aba0319f5.gif

Top Labels in this Space