Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.
Hola a todos
Soy nuevo en pwer BI, por favor ayuda a continuación.
cuenta en una nueva columna basada en otras 2 columnas.
Agradezco su apoyo aquí.
Servidor | RiskRank | Contar |
Server1 | 10 | 2 |
Server1 | 10 | 2 |
Server1 | 20 | 3 |
Server1 | 20 | 3 |
Server1 | 20 | 3 |
Server1 | 50 | 1 |
Server1 | 60 | 4 |
Server1 | 60 | 4 |
Server1 | 60 | 4 |
Server1 | 60 | 4 |
Server2 | 5 | 1 |
Server2 | 40 | 3 |
Server2 | 30 | 2 |
Server2 | 60 | 2 |
Server2 | 30 | 2 |
Server2 | 50 | 1 |
Server2 | 40 | 3 |
Server2 | 60 | 2 |
Server2 | 40 | 3 |
Solved! Go to Solution.
@KiranGupta15 - Si entiendo correctamente:
Count = COUNTROWS(FILTER('Table',[Server]=EARLIER([Server])&&[Risk]=EARLIER([Risk])))
Hola @KiranGupta15
Si desea obtener el recuento en otra columna de Power Query y mantener el modelo de datos, puede probar mi manera.
Construyo una mesa como la tuya para hacerme una prueba.
Duplicar la tabla y agrupar, a continuación, combinar dos tablas.
Un paso para que consigas los recuentos.
A continuación, combine dos tablas por columna Sever.
Resultado:
M Query es como se muestra a continuación, puede copiar esto en el Editor avanzado.
// Table
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCk4tKkstMlTSUTI0UIrVwStgRLqAKbqAGYUCRiBD0fgm6AqM0QUwjMBQYYougGEohhkgFbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Server = _t, RiskRank = _t]),
#"Merged Queries" = Table.NestedJoin(Source, {"Server", "RiskRank"}, Table2, {"Server", "RiskRank"}, "Table2", JoinKind.LeftOuter),
#"Expanded Table2" = Table.ExpandTableColumn(#"Merged Queries", "Table2", {"Count"}, {"Table2.Count"})
in
#"Expanded Table2"
Saludos
Rico Zhou
Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Hola @KiranGupta15
Si desea obtener el recuento en otra columna de Power Query y mantener el modelo de datos, puede probar mi manera.
Construyo una mesa como la tuya para hacerme una prueba.
Duplicar la tabla y agrupar, a continuación, combinar dos tablas.
Un paso para que consigas los recuentos.
A continuación, combine dos tablas por columna Sever.
Resultado:
M Query es como se muestra a continuación, puede copiar esto en el Editor avanzado.
// Table
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCk4tKkstMlTSUTI0UIrVwStgRLqAKbqAGYUCRiBD0fgm6AqM0QUwjMBQYYougGEohhkgFbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Server = _t, RiskRank = _t]),
#"Merged Queries" = Table.NestedJoin(Source, {"Server", "RiskRank"}, Table2, {"Server", "RiskRank"}, "Table2", JoinKind.LeftOuter),
#"Expanded Table2" = Table.ExpandTableColumn(#"Merged Queries", "Table2", {"Count"}, {"Table2.Count"})
in
#"Expanded Table2"
Saludos
Rico Zhou
Si este post ayuda,entonces considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.
Hola @KiranGupta15
puede hacerlo con Power Query de la siguiente manera:
// Table
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCk4tKkstMlTSUTI0UIrVwStgRLqAKbqAGYUCRiBD0fgm6AqM0QUwjMBQYYougGEohhkgFbEA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Server = _t, RiskRank = _t]),
#"Inserted Merged Column" = Table.AddColumn(Source, "Merged", each Text.Combine({[Server], [RiskRank]}, ""), type text),
#"Grouped Rows" = Table.Group(#"Inserted Merged Column", {"Merged"}, {{"Count", each Table.RowCount(_), Int64.Type}})
in
#"Grouped Rows"
Con saludos amables desde la ciudad donde la leyenda del 'Pied Piper de Hamelin' está en casa
FrankAT (Orgulloso de ser un Datanaut)
@KiranGupta15 - Si entiendo correctamente:
Count = COUNTROWS(FILTER('Table',[Server]=EARLIER([Server])&&[Risk]=EARLIER([Risk])))
Check out the November 2023 Power BI update to learn about new features.
Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.
Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!
User | Count |
---|---|
2 | |
1 | |
1 | |
1 | |
1 |