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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors
Top Kudoed Authors