Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi,
I am having a Dax requirement as shown below.
Supplier | Date | Region |
Amul | 02-08-2022 | BE |
Amul | 02-08-2022 | N.A |
LGL | 02-08-2022 | DE |
LGL | 02-08-2022 | DE |
Air | 02-08-2022 | AN |
Amul | 02-08-2022 | N.A |
Hitachi | 02-08-2022 | MN |
Amul | 02-08-2022 | BE |
Telecom | 02-08-2022 | N.A |
Intel | 02-08-2022 | LK |
Amul | 02-08-2022 | N.A |
Intel | 02-08-2022 | N.A |
Intel | 02-08-2022 | N.A |
Air | 02-08-2022 | AN |
Amul | 02-08-2022 | N.A |
LGL | 02-08-2022 | N.A |
Air | 02-08-2022 | N.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.
Solved! Go to 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]
)
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]
)
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]
)
User | Count |
---|---|
43 | |
26 | |
21 | |
16 | |
15 |
User | Count |
---|---|
54 | |
35 | |
18 | |
17 | |
15 |