Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello Power BI Community
I am having a difficulty calculating average price of all of our products per store per month.
Please find below as the data.
What I want to do is simple.
I would like to calculate an average price of each product for each brand by store.
Also is there a visual to show an average price as well as the lowest and highest price of the average??
(Like Stock Price Ticker?)
I am having a difficult time because there are multiple store price checks within a month,
so calculating a simple average just will not do it.
Your help is much appreciated.
Many thanks,
Hide
Solved! Go to Solution.
Hi @hidenseek9,
Try these formulas
Count=DISTINCTCOUNT(Data[Store])
Contribution (%)=[Count]/CALCULATE([Count],ALL(Data[Brand]),ALL(Data[Product]))
Hope this helps.
Hello Power BI Community,
I have a question regarding understanding distribution of a product at store level.
Please find below as a sample data
Data has a list of stores that sell certain products and our employees go to a store to check the price on shelf.
Sometimes, the price check happens multiple times a month.
What I would like to understand is that at any given month,
in how many stores each product is sold.
That way, I can understand the distirbution trend of our product over time.
Appreciate your support.
Many thanks,
H
Hi,
I get a message saying that the file size exceeds 5MB. Thereafter there is no option to download.
Hi @hidenseek9,
You say that you want to know in how many stores each product is sold? In your dataset, i see Product Name but i do not see any Store Name column. Please show the exact structure of your expected result.
Hi @hidenseek9,
Please share the exact structure you are expecting in the final result.
What I would like to know is below on any given month.
Many thanks,
H
Hi,
When i try to build a Pivot Table, i get the same number of stored checked for all brands. There is something wrong with the dummy data that you have shared. Share a smaller dataset and with respect to that smaller dataset, share the expected result (show actual numbers that you are expecting there).
Here is a simplified version of the sample data.
I have also attached the answers to the questions in the file already.
Basically, I would like to calculate the following in PowerBI
Many thanks,
H
Hi @hidenseek9,
Try these formulas
Count=DISTINCTCOUNT(Data[Store])
Contribution (%)=[Count]/CALCULATE([Count],ALL(Data[Brand]),ALL(Data[Product]))
Hope this helps.
Hi @hidenseek9,
>>I would like to calculate an average price of each product for each brand by store.
For this requirement, you can direct use matrix with original column to achieve this.
Sample:
Brand, Product Name as 'Rows', Stored as 'Columns', Total as Values with summary mode average.
>>Also is there a visual to show an average price as well as the lowest and highest price of the average??
You need to write a calculated column to calculate grouped average value, then create a matrix visual with above category and new calculated column.
AVERAGE = VAR temp = SUMMARIZE ( ALL ( 'Sample Data' ), [Brand], [Product Name], [Customer Danone Sales Team Name], "Average", AVERAGE ( [Price] ) ) RETURN SELECTCOLUMNS ( FILTER ( temp, [Brand] = EARLIER ( 'Sample Data'[Brand] ) && [Product Name] = EARLIER ( 'Sample Data'[Product Name] ) && [Customer Danone Sales Team Name] = EARLIER ( [Customer Danone Sales Team Name] ) ), "AVG", [Average] )
Result visual: category to rows, average to values with summary mode maximum and minimum
Summary.
Expand.
Regards,
Xiaoxin Sheng
@Anonymous
Thank you for your reply.
I am having a trouble with the DAX formula you provided on AVERAGE.
when I type VAR as a DAX function, below four comes up.
VAR.P
VAR.S
VARX.P
VARX.S
which one do I use to run the DAX formula you provided?
And what would the new formula look like?
Many thanks,
H
@Anonymous
I am having a trouble with your solution.
Which VAR DAX should I select?
Or any other way to solve the issue?
Many thanks,
H
Hello Power BI Community
I am having a difficulty calculating average price of all of our products per store per month.
Please find below as the data.
What I want to do is simple.
I would like to calculate an average price of each product for each brand by store.
Also is there a visual to show an average price as well as the lowest and highest price of the average??
(Like Stock Price Ticker?)
Your help is much appreciated.
Many thanks,
Hide
User | Count |
---|---|
77 | |
76 | |
41 | |
30 | |
24 |
User | Count |
---|---|
97 | |
91 | |
52 | |
47 | |
46 |