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
Syndicate_Admin
Administrator
Administrator

Cálculo del % de crecimiento anual en Power BI

Me gustaría preguntar cómo calcular los cambios en las ventas en power BI. Utilicé esa fórmula:

AnteriorAñoVentas] que es

AnteriorAñoVentas = CALCULAR([Totalventas],SAMEPERIODLASTYEAR(datesTable[Date]))
A continuación, se creó una nueva medida:
%Diff =
var diff = MeasuresTable[TotalSales] - [PreviousYearSales]
devolución
DIVIDE( diff,MeasuresTable[TotalSales],0).
Pero no ayudó.
2958,21-0/0=0 resultado esperado pero obteniendo el 100 %.
Entonces, ¿cómo solucionar esto?
4 REPLIES 4
Syndicate_Admin
Administrator
Administrator

@Analitika

Resolví un problema hace unos días, similar a este: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Divide-Calculate-Returning-100-even-if-0/m-p/...
Por favor, compruébelo.
Por cierto, ¿no deberías desviarlo por año anterior de la siguiente manera?

%Diff =
VAR diff = MeasuresTable[TotalSales] - [PreviousYearSales]
RETURN
    DIVIDE ( diff, [PreviousYearSales] ,0)





Es una tontería:

Analitika_0-1653481014394.png

El cambio debería ser del 0 %, no del número enorme.

@Analitika

Es difícil entender claramente el problema a menos que tenga un archivo PBIX

El cambio debe ser 0 no superior a 100000

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.