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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.