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.
Hola PB Expertos,
Me he esforzado por crear una tabla, pero fallé.
Los datos se simplifican
Me gustaría hacer una tabla de matriz, no. de la visita se mostrará en la columna
Este es el resultado esperado:
Aquí está la descarga PBIX .
deseo que alguien puede ayudar, muchas gracias!
hola @SimonChung_GGGG
Para su caso, simplemente cree una medida con lógica como se muestra a continuación:
Result =
VAR _table =
FILTER (
CROSSJOIN (
SUMMARIZE (
'Table',
'Table'[Royality],
'Table'[Customer],
"Totalsales", CALCULATE ( SUM ( 'Table'[Sales] ) ),
"Frequency", CALCULATE ( COUNTA ( 'Table'[Customer] ) )
),
Visit
),
[Frequency] = [Value]
)
RETURN
SUMX ( _table, [Totalsales] )
Resultado:
saludos
Lin
¡Un millón de gracias! Esta pregunta me ha estado luchando durante unos días
Hola @SimonChung_GGGG ,
Utilice este código para transformar primero los datos:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTI0MACSxkqxOhC+ERrfGInvBFdvBOcbofGNkfjOYPUgAhvXBawbrtgFrBmFa0Is1xXIMgVxTcFcNxjXCM41QeUaQrmxAA==", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Customer = _t, Sales = _t, Royality = _t]),
chgSalesType = Table.TransformColumnTypes(Source,{{"Sales", Int64.Type}}),
#"groupRows&Count" = Table.Group(chgSalesType, {"Customer", "Royality"}, {{"sales", each List.Sum([Sales]), type number}, {"visits", each Table.RowCount(_), Int64.Type}}),
chgVisitsType = Table.TransformColumnTypes(#"groupRows&Count",{{"visits", type text}})
in
chgVisitsType
En Power Query, vaya a Nuevo origen > Consulta en blanco y, a continuación, en Editor avanzado, pegue mi código sobre el código predeterminado.
A continuación, en la vista de informe, configure la matriz de la siguiente manera:
Proud to be a Datanaut!
@SimonChung_GGGG , ver si la segmentación puede ayudar a
https://www.daxpatterns.com/dynamic-segmentation/
https://www.daxpatterns.com/static-segmentation/
https://www.poweredsolutions.co/2020/01/11/dax-vs-power-query-static-segmentation-in-power-bi-dax-po...
https://radacad.com/grouping-and-binning-step-towards-better-data-visualization
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 |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |