Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Estoy usando una visualización de línea con varios valores de leyenda. Quiero mostrar leyendas como un porcentaje del total por mes.
Ahora cada valor de leyenda se muestra como un porcentaje del conjunto.
Por ejemplo, si el valor de enero es 2,78 % cuando agredo una columna de leyenda que tiene valores A, B, C, el porcentaje se muestra como
A - 0,73 %
B- 1,71 %
C- 0,33 %, que es el porcentaje del total
pero quiero mostrarlo como
A- 26,4 %
B - 61,71 %
C- 11,89 %, que es el porcentaje del total por mes. cada elemento de leyenda debe sumar a 100%
¿Hay alguna manera de hacer esto en un gráfico de líneas?
saludos
Hola @Samrawit21,
Por favor, comparta algunos datos ficticios con la estructura de la tabla sin procesar, entonces podemos hacer fórmula de codificación de prueba en él.
Cómo obtener respuestas a su pregunta rápidamente
saludos
Xiaoxin Sheng
I am using a line chart to display the distinct count of customers with multiple legend values. I want to show the count of customers as a percentage of the total per month.
Now each legend value is displayed as a percentage of the whole.
For example, if January had a percentage of value 2.78% when I added a legend column that has A, B, C values, the percentage is displayed as
A - 0.73%
B- 1.71%
C- 0.33%, which is the percentage of the total, but I want to show it like
A- 26.4%
B - 61.71%
C- 11.89%, which is the percentage of the total per month. each legend item must add to 100%
Is there a way to do this on a line chart?
I also want to add another line chart, which sums up legend values A and B.
Is this possible to do?
Below is my sample data.
Regards,
Leyenda | Clientes | YearMonth |
A | 1212144 | 201904 |
C | 8585899 | 201904 |
C | 5858989 | 201904 |
A | 9898877 | 201905 |
A | 8989988 | 201905 |
C | 8989999 | 201905 |
A | 9999921 | 201904 |
A | 2121212 | 201903 |
B | 2121212 | 201904 |
B | 1414121 | 201904 |
B | 2221111 | 201903 |
C | 4414141 | 201903 |
C | 2121212 | 201903 |
C | 7111212 | 201902 |
C | 7777721 | 201904 |
C | 8232323 | 201904 |
C | 3333212 | 201902 |
B | 2121233 | 201905 |
B | 1241414 | 201905 |
A | 1241414 | 201902 |
A | 1212121 | 201902 |
B | 4444455 | 201904 |
C | 2121255 | 201902 |
B | 4747777 | 201903 |
Hola @Samrawit21,
Por favor, compruebe la siguiente fórmula de medida si funciona de su lado:
Measure =
DIVIDE (
CALCULATE (
COUNTA ( 'Table'[customers] ),
ALLSELECTED ( 'Table' ),
VALUES ( 'Table'[YearMonth] ),
VALUES ( 'Table'[Legend] )
),
CALCULATE ( COUNTA ( 'Table'[customers] ), ALLSELECTED ( 'Table' ) )
)
saludos
Xiaoxin Sheng
Hola
Estoy tring para crear un gráfico de líneas con los siguientes datos. Necesito la salida del gráfico de líneas para mirar según tabel 2. pero no toma % de COlumns - Considera % del total general.
Los campos son - nombre del producto - en col / Axis. Mes en fila/ leyenda. Se utiliza COunt de id de cliente.
Agradezca su ayuda.
Thank you for your reply!
I also want to add another line chart, which sums up legend values A and B.
Is this possible to do?
Hola @Samrawit21,
Actualmente, no puede usar el campo de leyenda y varios campos de valor al mismo tiempo. Tal vez pueda intentar utilizar R visual para trazar manualmente el gráfico.
saludos
Xiaoxin Sheng
@Samrawit21, intenta como
divide([measure], allexcept(Table, Table[month], Table[category]))
Oe
divide([measure], allexcept(Table, Table[category]))
Consulte también https://community.powerbi.com/t5/Desktop/Percentage-of-subtotal/td-p/95390