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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Edimar90
Frequent Visitor

dividir fila 1 entre fila 2

Requiero obtener el % de venta el cual se calcula 

 

Gastos / Ventas 

 

Pero los datos los tengo en categoria Planta y subcategoria Rubro como en el ejemplo de la imagen:

Planta = PLANTA 1 Y PASTAS

Rubro = [Kilos Ventidos],Ventas,Gastos

Values = Columna Anterior

Edimar90_0-1716313431806.png

Edimar90_1-1716313657473.png

 

 

El problema:

Al momento de dividir gastos /  venta = ERROR 

Lo correcto seria lo siguiente: 
13,204,780 / 74,215,884 = 0.177922936281403

 

Gracias por la ayuda.

1 ACCEPTED SOLUTION
v-tianyich-msft
Community Support
Community Support

Hi @Edimar90 ,

 

Add the ALL or ALLSELECETED function in front of the tb_Admon_Gastos_Planta table, I'm not sure if it meets your expected results, please show the sample data in a usable form as well as the expected results.

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-tianyich-msft
Community Support
Community Support

Hi @Edimar90 ,

 

Add the ALL or ALLSELECETED function in front of the tb_Admon_Gastos_Planta table, I'm not sure if it meets your expected results, please show the sample data in a usable form as well as the expected results.

 

Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

ya tengo los dos valores separados pero sigue mandando error en la divicion:

Edimar90_0-1716391715931.png

 

GastosAntALL = CALCULATE([GastosAnterior],ALL(tb_Admon_Gastos_Planta[PLANTA]))
VentasAntALL = CALCULATE([VentasAnterior],ALLSELECTED(tb_Admon_Gastos_Planta[PLANTA]))

%/VNAntPlantas = CALCULATE(tb_Admon_Gastos_Planta[GastosAntALL]/[VentasAntALL],ALLSELECTED(tb_Admon_Gastos_Planta[PLANTA]))
 
Gracias!
 
AnalyticPulse
Impactful Individual
Impactful Individual

I need to split the rows

Row Expenses / Row Sales

But I have the data in the Plant category and the Category subcategory, as in the example in the image:


Edimar90_0-1716315440599.png

 

 

Plant = PLANT 1 AND PASTA

Item = [Kilos Sold],Sales,Expenses

Values = Previous Column




The problem:

At the time of splitting expenses/sales = ERROR

My table:

Edimar90_1-1716315762255.png

act = Value
Rubro = subcategory
Planta = category


My operation is: 

Gastos = CALCULATE( SUM(tb_Admon_Gastos_Planta[act]), FILTER(tb_Admon_Gastos_Planta,tb_Admon_Gastos_Planta[Rubro] = "Gastos"))

Ventas = CALCULATE( SUM(tb_Admon_Gastos_Planta[act]), FILTER(tb_Admon_Gastos_Planta,tb_Admon_Gastos_Planta[Rubro] = "Ventas"))

DIVIDE(SUMX(tb_Admon_Gastos_Planta,tb_Admon_Gastos_Planta[Gastos]),SUMX(tb_Admon_Gastos_Planta,[Ventas]),0)

The correct thing to do would be the following:
13,204,780 / 74,215,884 = 0.177922936281403

Thanks for the help

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.