Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi all,
I would like to change duplicates in my row into null
For example this as my original table, where I would like to change the orange boxes into null as they are replication.
Becoming into this:
and Ideally my end product is do calculate the Score based on the Type.
Hope someone can give some guidance.
Many thanks.
Solved! Go to Solution.
@jinweitan , better try a measure like
Measure = AVERAGEX(SUMMARIZE (filter('Table 1',not(isblank('Table 1'[Score]))),'Table 1'[GUID],'Table 1'[Type],'Table 1'[Score]),[score])
This is a Power Query Solution:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUXIEYkMDpVgdnFwwxwjKMcLBc0Log3GVYmMB", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [GUID = _t, TYPE = _t, SCORE = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"GUID", Int64.Type}, {"TYPE", type text}, {"SCORE", Int64.Type}}),
#"Grouped Rows" = Table.Group(#"Changed Type", {"GUID", "TYPE", "SCORE"}, {{"Rows", each Table.AddColumn(Table.AddIndexColumn(_, "Index", 1,1), "Score_2", each if [Index] > 1 then null else [SCORE]), type table }}),
#"Removed Other Columns" = Table.SelectColumns(#"Grouped Rows",{"Rows"}),
#"Expanded Rows" = Table.ExpandTableColumn(#"Removed Other Columns", "Rows", {"GUID", "TYPE", "Index", "Score_2"}, {"GUID", "TYPE", "Index", "Score_2"}),
#"Renamed Columns" = Table.RenameColumns(#"Expanded Rows",{{"Score_2", "SCORE"}}),
#"Changed Type1" = Table.TransformColumnTypes(#"Renamed Columns",{{"GUID", Int64.Type}, {"TYPE", type text}, {"Index", Int64.Type}, {"SCORE", Int64.Type}})
in
#"Changed Type1"
@jinweitan , better try a measure like
Measure = AVERAGEX(SUMMARIZE (filter('Table 1',not(isblank('Table 1'[Score]))),'Table 1'[GUID],'Table 1'[Type],'Table 1'[Score]),[score])