Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hola a todos,
Tuve una situación en la que usaría esta fomula en EXCEL
=COUNTIF($C$4:C4,C4)
Para tener este RESULTADO en la COLUMNA "ACUMULATIVO"
Así que UKXX1 aparece 2 veces y dice 1 por primera vez y 2 por segunda vez aparece así sucesivamente.
¿Es posible hacer lo mismo en DAX? Lo he estado intentando de muchas maneras diferentes, pero no puedo hacerlo.
Gracias
Solved! Go to Solution.
Hay @Sh00un
Descargar archivo PBIX de ejemplo
Sé que ha preguntado sobre DAX, pero es muy fácil en Power Query
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUQr1jogwVIrViVYyQuEZQ3lGYJ4JlGcM5pmi8MxQeOYoPAsozxTMs4TyzJViYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Index = _t, #"ROUTE NUMBER" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ROUTE NUMBER", type text}, {"Index", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each List.Count(List.FindText(List.FirstN(#"Changed Type"[ROUTE NUMBER],[Index]),[ROUTE NUMBER]))),
#"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Index"})
in
#"Removed Columns"
Saludos
Phil
Hay @Sh00un
Descargar archivo PBIX de ejemplo
Sé que ha preguntado sobre DAX, pero es muy fácil en Power Query
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUQr1jogwVIrViVYyQuEZQ3lGYJ4JlGcM5pmi8MxQeOYoPAsozxTMs4TyzJViYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Index = _t, #"ROUTE NUMBER" = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"ROUTE NUMBER", type text}, {"Index", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each List.Count(List.FindText(List.FirstN(#"Changed Type"[ROUTE NUMBER],[Index]),[ROUTE NUMBER]))),
#"Removed Columns" = Table.RemoveColumns(#"Added Custom",{"Index"})
in
#"Removed Columns"
Saludos
Phil