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.
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])
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
105 | |
79 | |
69 | |
62 |
User | Count |
---|---|
142 | |
105 | |
103 | |
85 | |
70 |