Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
RonaldvdH
Post Patron
Post Patron

Calculated column that shows unique values and if a value isn't unique just shows them once

Hey Guys,

 

Is het possible to just show distinct values in a calculated column and if a value isn't unique then just show it once ?

 

I'm using this formula but I need to change the "Ja (=Yes)" so that is shows the Zappter[Functionele locatie Zappter] but only once and the only with the newest created date

 

Test = 
IF(
    COUNTROWS(
        FILTER(
            ZAPPTER,Zappter[Functionele Locatie Zappter]=EARLIER(Zappter[Functionele Locatie Zappter]))) > 1, 
            "Ja",Zappter[Functionele Locatie Zappter])

 

 

Functionele locatieCreated dateTest
0000AT|10||01-03-240000AT|10||
0000AB|2|A|01-03-24 
0000AB|2|A|15-07-240000AB|2|A|
0000AA|48||25-03-240000AA|48||
0000AB|9||10-01-240000AB|9||
0000AA|100|A|05-06-24 
0000AA|100|A|14-07-240000AA|100|A|
1 ACCEPTED SOLUTION
v-nuoc-msft
Community Support
Community Support

Hi @RonaldvdH 

 

For your question, here is the method I provided:

 

Here's some dummy data

 

"Table"

vnuocmsft_0-1721095943894.png

 

Create a column.

 

Test = 
VAR LatestDate = 
    CALCULATE(
        MAX('Table'[Created date]),
        FILTER(
            'Table',
            'Table'[Functionele locatie] = EARLIER('Table'[Functionele locatie])
        )
    )
RETURN
IF(
    'Table'[Created date] = LatestDate,
    'Table'[Functionele locatie],
    BLANK()
)

 

Here is the result.

 

vnuocmsft_1-1721095990634.png

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

2 REPLIES 2
v-nuoc-msft
Community Support
Community Support

Hi @RonaldvdH 

 

For your question, here is the method I provided:

 

Here's some dummy data

 

"Table"

vnuocmsft_0-1721095943894.png

 

Create a column.

 

Test = 
VAR LatestDate = 
    CALCULATE(
        MAX('Table'[Created date]),
        FILTER(
            'Table',
            'Table'[Functionele locatie] = EARLIER('Table'[Functionele locatie])
        )
    )
RETURN
IF(
    'Table'[Created date] = LatestDate,
    'Table'[Functionele locatie],
    BLANK()
)

 

Here is the result.

 

vnuocmsft_1-1721095990634.png

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

RonaldvdH
Post Patron
Post Patron

@fooddor @amitchandak  do you have any ideas ? 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.