Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Pyrofenix
Regular Visitor

Mostrar una tarjeta con % del total

Estoy tratando de mostrar el % de las ventas totales que se realizan Ingresos del producto, pero siguen recibiendo un error o valor incorrecto cuando lo intento.

Ventas 2020Código de ventas
$45Publicidad
$300Ingresos por productos
$5Tarifas de servicio
$65Publicidad
$35Otro

% de ingresos del producto ($300) / Ingresos totales ($450) - 66,7%

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hola @Pyrofenix

Crear una medida

Measure = CALCULATE(SUM(Sheet8[2020 Sales]),FILTER(Sheet8,Sheet8[Sales Code]="Product Revenue"))/CALCULATE(SUM(Sheet8[2020 Sales]),ALLSELECTED(Sheet8))

Capture15.JPG

Saludos
Maggie
Equipo de Apoyo Comunitario _ Maggie Li
Si este post ayuda, por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

edhans
Super User
Super User

Quieres algo en la línea de esto. El ALL() en el denominador le dice que ignore todos los filtros y obtenga todo el total.

% of Total =
VAR CurrentSales =
    SUM( Table[Sales] )
VAR TotalSales =
    SUMX(
        ALL( Table ),
        Table[Sales]
    )
VAR Result =
    DIVIDE(
        CurrentSales,
        TotalSales,
        0
    )
RETURN
    Result



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.