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
Anonymous1993
Frequent Visitor

Replace N.a with non null Value corresponding to the same supplier-DAX

Hi,

 

I am having a Dax requirement as shown below.

 

SupplierDateRegion
Amul02-08-2022BE
Amul02-08-2022N.A
LGL02-08-2022DE
LGL02-08-2022DE
Air02-08-2022AN
Amul02-08-2022N.A
Hitachi02-08-2022MN
Amul02-08-2022BE
Telecom02-08-2022N.A
Intel02-08-2022LK
Amul02-08-2022N.A
Intel02-08-2022N.A
Intel02-08-2022N.A
Air02-08-2022AN
Amul02-08-2022N.A
LGL02-08-2022N.A
Air02-08-2022N.A

 

I have few N.A values in Region Columns.i Want to replace these Na with the value in supplier column which has aregion value

 

Example, if Supplier 'Amul' is Shown as BE region, all amul with N.a should be replaced with BE.

 

Each supplier will either have only one region or N.a and some regions will have N.a alone which can be left as such.

Hope this is clear.

 

Thanks in advancefor your help.

1 ACCEPTED SOLUTION

@Anonymous1993 
Please use

Region 1 = 
IF ( 
    Suppliers[Region] = "N.A",
    COALESCE(
        MAXX (
            FILTER ( 
                CALCULATETABLE ( 
                    Suppliers, 
                    ALLEXCEPT ( Suppliers, Suppliers[Supplier] )
                ),
                Suppliers[Region] <> "N.A"
            ),
            Suppliers[Region]
        ),
        "N.A"
    ),
    Suppliers[Region]
)

1.png

View solution in original post

5 REPLIES 5
Anonymous1993
Frequent Visitor

@tamerj1 Could you help on this please

Hi @Anonymous1993 
Please use

Region 1 = 
IF ( 
    Suppliers[Region] = "N.A",
    MAXX (
        FILTER ( 
            CALCULATETABLE ( 
                Suppliers, 
                ALLEXCEPT ( Suppliers, Suppliers[Supplier] )
            ),
            Suppliers[Region] <> "N.A"
        ),
        Suppliers[Region]
    ),
    Suppliers[Region]
)

1.png

Can i know why Telecom is returning blank if no other value is there, it should return N.a itself. could you help on that?

@Anonymous1993 
Please use

Region 1 = 
IF ( 
    Suppliers[Region] = "N.A",
    COALESCE(
        MAXX (
            FILTER ( 
                CALCULATETABLE ( 
                    Suppliers, 
                    ALLEXCEPT ( Suppliers, Suppliers[Supplier] )
                ),
                Suppliers[Region] <> "N.A"
            ),
            Suppliers[Region]
        ),
        "N.A"
    ),
    Suppliers[Region]
)

1.png

Anonymous1993
Frequent Visitor

works like a charm! thanks @tamerj1  very much

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

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!

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.

Users online (27)