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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Help: Realçar valores de células duplicadas no elemento tabela.

Prezados, tudo bem?

 

Então estou iniciando no mundo do PBI.

Tenho  o seguinte desafio ao qual não consegui superar.

é criar uma formatação condicional de valores duplicados nas céculas como no excel.

Nomesidade

 

Benício20
Aristóteles20
Alexandro20
Aristóteles20
Alexandro20
Merlin20
Fontana20
Frota20
Lobato20
Damon20
Damon 
1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi AlexJunio,

You could create a index column like below 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUTI0UIrVgTCNIMwyINMYwkxBiBYDmSYQZipCFMaMBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [name = _t, amount = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"name", type text}, {"amount", Int64.Type}}),
    #"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 1, 1),
    #"Grouped Rows" = Table.Group(#"Added Index", {"name"}, {{"all", each _, type table [name=text, amount=number, Index=number]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.AddIndexColumn([all], "new index",1,1)),
    #"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"amount", "new index"}, {"Custom.amount", "Custom.new index"}),
    #"Removed Columns" = Table.RemoveColumns(#"Expanded Custom",{"all"})
in
    #"Removed Columns"

Then  create measure like below

Measure = IF(MIN('Table'[Custom.new index])<>1, 1,0)

Use this measure in conditional format like below

429.PNG

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
dax
Community Support
Community Support

Hi AlexJunio,

You could create a index column like below 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WSlTSUTI0UIrVgTCNIMwyINMYwkxBiBYDmSYQZipCFMaMBQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [name = _t, amount = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"name", type text}, {"amount", Int64.Type}}),
    #"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 1, 1),
    #"Grouped Rows" = Table.Group(#"Added Index", {"name"}, {{"all", each _, type table [name=text, amount=number, Index=number]}}),
    #"Added Custom" = Table.AddColumn(#"Grouped Rows", "Custom", each Table.AddIndexColumn([all], "new index",1,1)),
    #"Expanded Custom" = Table.ExpandTableColumn(#"Added Custom", "Custom", {"amount", "new index"}, {"Custom.amount", "Custom.new index"}),
    #"Removed Columns" = Table.RemoveColumns(#"Expanded Custom",{"all"})
in
    #"Removed Columns"

Then  create measure like below

Measure = IF(MIN('Table'[Custom.new index])<>1, 1,0)

Use this measure in conditional format like below

429.PNG

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.