The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
I have 10 records where I need to populate a null. I add these statements using Advanced Editor. At first I thought it was working, because when I added the first statement and tested it, it worked. But, when I added the other 9, it only accepted the last one.
Admittedely, I'm just modifiying code from a solution I saw here, so kind of flying blind.
Here is my code - only the last one is beling applied
#"AddTimeType1" = Table.ReplaceValue(#"Changed Type", null, each if [Job Requisition] = "R2620 Resource Specialist 2 - Nutrition Education (Filled)" then "Part Time" else null, Replacer.ReplaceValue,{"CF FT Time Type on Job Requisition"}),
#"AddTimeType2" = Table.ReplaceValue(#"Changed Type",null, each if [Job Requisition] = "R3334 Clinic LVN (Filled)" then "Full Time" else null, Replacer.ReplaceValue,{"CF FT Time Type on Job Requisition"}),
#"AddTimeType3" = Table.ReplaceValue(#"Changed Type", null, each if [Job Requisition] = "R3899 Clinic Scheduler (Filled)" then "Full Time" else null, Replacer.ReplaceValue,{"CF FT Time Type on Job Requisition"}),
#"AddTimeType4" = Table.ReplaceValue(#"Changed Type", null, each if [Job Requisition] = "R3769 Medical Assistant (Filled)" then "Per Diem" else null, Replacer.ReplaceValue,{"CF FT Time Type on Job Requisition"}),
#"AddTimeType5" = Table.ReplaceValue(#"Changed Type", null, each if [Job Requisition] = "R3780 PICC Coordinator- RN (Filled)" then "Full Time" else null, Replacer.ReplaceValue,{"CF FT Time Type on Job Requisition"}),
#"AddTimeType6" = Table.ReplaceValue(#"Changed Type", null, each if [Job Requisition] = "R3910 Acute Care Assistant- North 2 Telemetry (Filled)" then "Per Diem" else null, Replacer.ReplaceValue,{"CF FT Time Type on Job Requisition"}),
#"AddTimeType7" = Table.ReplaceValue(#"Changed Type", null, each if [Job Requisition] = "R3702 Dietary Aide - Gift Shop (Filled)" then "Per Diem" else null, Replacer.ReplaceValue,{"CF FT Time Type on Job Requisition"}),
#"AddTimeType8" = Table.ReplaceValue(#"Changed Type", null, each if [Job Requisition] = "R3735 Clinic Scheduler (Filled)" then "Full Time" else null, Replacer.ReplaceValue,{"CF FT Time Type on Job Requisition"}),
#"AddTimeType9" = Table.ReplaceValue(#"Changed Type", null, each if [Job Requisition] = "R3689 Staff RN PD 2- Birth Center (Filled)" then "Per Diem" else null, Replacer.ReplaceValue,{"CF FT Time Type on Job Requisition"}),
#"AddTimeType10" = Table.ReplaceValue(#"Changed Type", null, each if [Job Requisition] = "R3853 Administrative Assistant of Specialty Nursing Services (Filled)" then "Full Time" else null, Replacer.ReplaceValue,{"CF FT Time Type on Job Requisition"})
in
#"AddTimeType10"
Solved! Go to Solution.
Hi @Decal,
You forgot to update all table references by which I mean the #"Changed Type" here in your code.
Table.ReplaceValue(#"Changed Type",
For the first line of code that is probably true (I can't verify as it is not included in the snippet)
But for the second line you should pass your transformed table on, like so:
#"AddTimeType1" = Table.ReplaceValue(#"Changed Type", null, each if [Job Requisition] = "R2620 ... }),
#"AddTimeType2" = Table.ReplaceValue(#"AddTimeType1",null, each if [Job Requisition] = "R3334 ... }),
#"AddTimeType3" = Table.ReplaceValue(#"AddTimeType2", and so on.
I hope this is helpful
Hi @Decal,
You forgot to update all table references by which I mean the #"Changed Type" here in your code.
Table.ReplaceValue(#"Changed Type",
For the first line of code that is probably true (I can't verify as it is not included in the snippet)
But for the second line you should pass your transformed table on, like so:
#"AddTimeType1" = Table.ReplaceValue(#"Changed Type", null, each if [Job Requisition] = "R2620 ... }),
#"AddTimeType2" = Table.ReplaceValue(#"AddTimeType1",null, each if [Job Requisition] = "R3334 ... }),
#"AddTimeType3" = Table.ReplaceValue(#"AddTimeType2", and so on.
I hope this is helpful