cancel
Showing results 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.

Resolver I

## Calculate different profit depending of the percentatge

Hi Community,

I have a problem with sellers' percentages. Depending on the customer, sales have to be distributed between two sellers. I had used the combination of queries to retrieve the percentage of each seller in Power Query Editor, to create a new custom column by multiplying sales by the percentage, but the result is not right. I tried to do the same with a calculated column, but I don't get the right amount.

Any ideas about how can I solve this issue?

Thanks to everybody for your support and help.

José Luis

1 ACCEPTED SOLUTION
MVP

yes, the relationship is only between the costumer numbers not between the product categories.

You have to generate a key column for the combination of customer and product categorie.

Please mark my post as solution, this will also help others.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."

9 REPLIES 9
Resolver I

the model is only an example. Tell me what you think I must change to become consistent.

Thanks.

MVP

Hi @jlarques ,

I think for a relationship the Porcentaje should always add up to 100%.

As you can see in my screenshot, it is currently 300% for the customer.

Please mark my post as solution, this will also help others.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."

Resolver I

you're right and maybe this is the reason because the amount is not 50% in the case of Johnson Stone costumer, as you can see in the image below.

The amount for each seller would have to be 719.374,45€ instead of 3.451.673.15€.

Do you know if the relationship is the reason?

MVP

yes, the relationship is only between the costumer numbers not between the product categories.

You have to generate a key column for the combination of customer and product categorie.

Please mark my post as solution, this will also help others.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."

MVP

try this Measure

``````VENTA =
SUMX (
'Reporte de Pedidos';
SUMX (
RELATEDTABLE ( 'Cliente x Comercial' );
'Reporte de Pedidos'[VALOR] * 'Cliente x Comercial'[Porcentaje]
)
)``````

Please mark my post as solution, this will also help others.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."

Resolver I

Hi, @mwegener

I tried to create a new calculated column with the total sales depending on the percentage, but the result is the same, as you can see in the images below.

The quantity is the same when I create a new measure.

MVP

Hi @jlarques ,

could you share a sample PBIX File?

Please mark my post as solution, this will also help others.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."

Resolver I

yes, sure.

Please, tell me if you can access or not.

Thanks again.

MVP

Hi @jlarques ,

in my opinion, the DAX result looks good in the report.

But I'm not sure if your model is correct (consistent).

Please mark my post as solution, this will also help others.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."

Announcements

#### 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

#### Power BI Monthly Update - April 2024

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

#### Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors