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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Find Unique values in column

Hi all,

 

I'm trying to check whether the same value(number format) has occurred previously in the column, and not whether it occurs subsequently, I only want it to look up the column, not down the column.

=IF(COUNTIF(N$1:N14,N15)>0,0,1) - this is the formula in Excel, that is doing that.

can you please help me figure out how to do it in Power BI.

Thanks

 

Ket

1 ACCEPTED SOLUTION

Hi @Anonymous,

If you do need to consider about the performence, I suggest you use a measure instead of the calculated column:

Measure = 
IF (
    COUNTROWS (
        FILTER (
            ALL(Table1),
            [Index] < MAX( [Index] )
                && [Item] = MAX(Table1[Item] )
        )
    )
        > 0,
    0,
    1
)

Result:

1.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

Community Support Team _ Daniel He
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

7 REPLIES 7
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

Could you please offer some sample data and post your desired result if possible?

 

Regard,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-danhe-msft,

 

please see the picture below, if the Payment ID appears in the list for the first time put 1 in Unique Payment column, if not then 0,

I highlighted rows for better understanding.

The solution that @Zubair_Muhammad suggested works if ill reduces the size of the data, but I need it to work on a large data.

Thanks   

 

Capture2.PNG

Hi @Anonymous,

Based on my test, I also need to add an index column to solve your problem and I suggest you refer to Zubair_Muhammad's solution, it is an easy solution.

You could refer to below link to add index:

https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi

 

Regards,

Daniel He

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-danhe-msft,

 

This is for the monthly report, data has around 40K lines, if I will reduce the number of lines then the formula is working. 

Otherwise, it shows an error "There's not enough memory to complete this operation. Please try again later when there may be more memory available."

Thanks

 

Ket

Hi @Anonymous,

If you do need to consider about the performence, I suggest you use a measure instead of the calculated column:

Measure = 
IF (
    COUNTROWS (
        FILTER (
            ALL(Table1),
            [Index] < MAX( [Index] )
                && [Item] = MAX(Table1[Item] )
        )
    )
        > 0,
    0,
    1
)

Result:

1.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous

 

In PowerBI, you will need little support from Index Column..then you can use this calculated column

 

Calculated Column =
IF (
    COUNTROWS (
        FILTER (
            Table1,
            [Index] < EARLIER ( [Index] )
                && [ColumnName] = EARLIER ( [ColumnName] )
        )
    )
        > 0,
    0,
    1
)
Anonymous
Not applicable

hey @Zubair_Muhammad,

I tried it but it shows an error "There's not enough memory to complete this operation. Please try again later when there may be more memory available."

can you suggest something?

Thanks

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.