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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
DW868990
Helper IV
Helper IV

DAX to replace duplicate measure values with BLANK

Hi, 

I have a DAX question I am looking for some advice on - 

I have a simple DAX measure for Total Sales - SUM(Sales[SalesAmount]), in a table with Products like below:

DW868990_0-1691650390372.png

But what I am after is for when the measure returns a duplicate value, for all duplicated values to return BLANK, just wondering how I would need to tweak the measure to get this result. So the end result looks like below. 

DW868990_1-1691650474450.png

Any advice appreciated, thanks in advance. 




1 ACCEPTED SOLUTION

 

Duplicate Measure = 
VAR CurrentAmount = [Total Amount]
VAR CountOfCurrentAmount = 
    CALCULATE(
        COUNTROWS('table (2)'),
        FILTER(
            ALL('table (2)'), 
            'table (2)'[Amount] = CurrentAmount
        )
    )
RETURN
IF(CountOfCurrentAmount > 1, BLANK(), [Total Amount])

 

annonymous1999_0-1691651236286.png

 

if i helped you solve your question please leave a thumbs up and accept as solution

View solution in original post

3 REPLIES 3
eliasayyy
Memorable Member
Memorable Member

hello @DW868990  what do you mean by duplicate value

As in the above example Bannana, Orange and Lettuce all returned 30, so therefore as that value occurs more than once than they should be BLANK.

 

Duplicate Measure = 
VAR CurrentAmount = [Total Amount]
VAR CountOfCurrentAmount = 
    CALCULATE(
        COUNTROWS('table (2)'),
        FILTER(
            ALL('table (2)'), 
            'table (2)'[Amount] = CurrentAmount
        )
    )
RETURN
IF(CountOfCurrentAmount > 1, BLANK(), [Total Amount])

 

annonymous1999_0-1691651236286.png

 

if i helped you solve your question please leave a thumbs up and accept as solution

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors