Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
I am having trouble figuring out a way to accurately track market share over time on a line chart. Currently, I have my source data as an excel spreadsheet which I receive information for on market share, which is very simply "Total Machines of company X divided by Total Machines at site Y". This gets updated periodically as I find out new information on different sites, so every few days the market share % may change slightly.
Here is an example of the excel spreadsheet which provides the source for my Power BI, and the market share I am basing this off:
When I created the line chart, I wanted to track these over time, so i used the following DAX formula:
@TomR726 you will have a date column and when each transaction happens it will have a date when it happened, not multiple date columns, but one date column with the value when the actual event/transaction happened. In your example, you will still have 3 rows and each row will have a date next to it, you table will have 3 rows, 4 columns
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@TomR726 if you don't have the date column at the source, Power BI will not able to generate it by itself. That's it. You need to bring the date column to your source to make it work.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Fair enough, I can look in to trying to add that in despite the manual issue. One last question, when I add that in and change it over time- Say I make a change august 22nd that takes market share from 73.3% to 61.1%, then another change August 28th going from 61.1% back to 73.3% because I found out that area does not apply. The last modified date in the source excel spreadsheet would be August 28th, so would I need multiple columns that shows every date change, or just the most recent? i feel like I may be getting in to the exact same problem with that if its kept in one column unless I am misunderstanding
@TomR726 you are talking about the dates, where do you have date in your sample data? I don't see it anywhere, how someone will know when you are talking about dates what does that even mean in context to the sample data? Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
So there are no dates in the excel source spreadsheet, which is why I did not post them. The excel source spreadsheet only contains market share data. The reason for this is that there are hundreds to thousands of rows for each country, and it would not be feasible (at least not practical at this time) to have a separate column with a date updated everytime the corresponding cells for the market share calculation was updated in excel.
That all being said, there are dates in the x-axis shown in my power BI line chart screenshot. My idea was to refresh this file daily, in hopes of seeing the updated changes from excel, and tracking them over time. So to reference my previous example, if the market share was 73.3% for a country when I started tracking it on august 10th, and the market share dropped down to 61.1% on August 22nd, I would expect to see something like this:
I guess I can try to boil it down to:
@TomR726 can you provide sample data with the expected output, it is not clear what you are trying to achieve. Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Sure thing, I can provide additional data:
So using the information above, we see that Ghana has a market share of 73.3% (22 machines out of a total 30).
So when I started tracking this information (August 10th), this is the info that I had to establish the market share. The line chart shows 73.3%, in line with what is in the source excel spreadsheet
Now suppose I find out some new information on August 22nd, and that is the day I update my excel spreadsheet that feeds power BI. Lets say its a new area I didnt know about, and therefore the market share calculation would change:
Now my market share is only 61.1%, once we take in to account the new site. However, when I update the information and refresh power BI, here is what I see:
Instead of a drop from 73.3% to 61.1% market share on August 22nd, I simply see the new calculation in a straight line. I'm hoping to track these changes over time so we can see the rise/fall of market share, so unfortunately this chart is just updating to the most recent market share % with a completely straight line.
I hope that helps, I dont know what other data you may need, but please let me know if there is anything else and I can provide it.
Thanks!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
78 | |
78 | |
58 | |
36 | |
33 |
User | Count |
---|---|
95 | |
62 | |
56 | |
49 | |
41 |