Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi Team,
please help,
what I am looking is based on belwo table,
if Client is 99638 and Type is "Sample" then Client value to be changed to 99999.
if Client is 99567 and Type is "Sample" then Client value no chnage.
could oyu please provide me query to solve this
Thanks
VJ
Solved! Go to Solution.
Hi, @Vemul
= Table.ReplaceValue(Your_Source, each [Type], 99999, (x,y,z)=> if x=99638 and y="Sample" then z else x, {"Client"})
Stéphane
Hi @Vemul,
Before
After
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WsrQ0M7ZQ0lHyL8pMz8xLzFGK1QEJmpqZAwWDE3MLclKhQhB1KEIQVQitsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Client = _t, Type = _t]),
ChangedType = Table.TransformColumnTypes(Source,{{"Client", Int64.Type}}),
ReplacedClient = Table.ReplaceValue(ChangedType,
each [Client] = 99638 and [Type] = "Sample",
each 99999,
(x,y,z)=> if y then z else x,
{"Client"} )
in
ReplacedClient
Hi @Vemul,
Before
After
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WsrQ0M7ZQ0lHyL8pMz8xLzFGK1QEJmpqZAwWDE3MLclKhQhB1KEIQVQitsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Client = _t, Type = _t]),
ChangedType = Table.TransformColumnTypes(Source,{{"Client", Int64.Type}}),
ReplacedClient = Table.ReplaceValue(ChangedType,
each [Client] = 99638 and [Type] = "Sample",
each 99999,
(x,y,z)=> if y then z else x,
{"Client"} )
in
ReplacedClient
Hi, @Vemul
= Table.ReplaceValue(Your_Source, each [Type], 99999, (x,y,z)=> if x=99638 and y="Sample" then z else x, {"Client"})
Stéphane
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
13 | |
13 | |
11 | |
8 | |
8 |
User | Count |
---|---|
17 | |
10 | |
7 | |
7 | |
7 |