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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
mekaelj
Helper II
Helper II

Compare sales to target net price

Hi,

 

I have a table in which all my sales lines end up. This data comes from an SQL server that updates with new lines from new sales daily. From this I have created another table where I've taken the average from each product group and put as a target price. I have several product group levels that I can drill down into and also sell my products in different countries.

 

What's annoying me is that I can't seem to create a measure that shows anything meaningful unless I slice down into one of the smaller product groups. The measure for the sales creates an average for all the sales, and since I don't sell the same amounts of each product the average sales price is vastly different from my target price, whereas if you drill down they're very similar.

 

How do I create some sort of measure that shows anything meaningful even when it's unfiltered? Attaching pictures to show what I mean. To the left is drilled down into a specific product whereas the right picture is the overall sales. 

 

Capture2.PNGCapture.PNG

 

My measures used are the following:

 

ASP Local Currency = DIVIDE([sales amount local currency];[Sales Q])

 

Target Net Price = AVERAGE(Price[Value])

 

Diff TNP ASP = IFERROR(([ASP Local Currency]-[Target Net Price])/[Target Net Price];BLANK())

4 REPLIES 4
TomMartens
Super User
Super User

Hey,

 

you have to go down to the detail row, by using AVERAGEX( 'table' , expression)

 

Averages Sales Price =
AVERAGEX('your sales table', [Sales Amount] / [Amount])

If you can't adapt this to you formual, it is helpful if you prepare some sample data and provide a link for downloading the file.

 

 

Hope this helps



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Hi,

 

I've created a bit of sample data that roughly shows what I mean.

 

As you can see in the sample data with the example of Sweden, there's a 2.5% gap between the Average Sales Price and the Target Net Price. If you drill down into the product groups however, there's always a 0.00-0.01% gap. This kind of renders the unfiltered table a bit useless I feel as it's not showing any values of importance. 

 

Is there a way that I can make the unfiltered table show any kind of meaningful statistics?

 

Here are the files:

 

https://ufile.io/aggv4 (PBIX)

 

https://ufile.io/cpbbm (Data Excel)

 

Regards,

Hey,

 

I will have a closer look at the data in the evening, I have to earn my rent for now 😉



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Sorry,

 

but the download is blocked by machine, can you share again on OneDrive or Dropbox?

 

Regards



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

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 MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.