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.
Hey there,
I am not new to Power BI and feel like this should be an easy task but I'm stuck somehow. Maybe I just google it wrong but can't seem to find anything similar on the web so my hopes are on you.
I got a table with a history of prices from different platforms like this:
This includes prices from my companys online shop as well, so if its my own product, platform will be 'OwnShop'.
There are several prices on each platform for the same products on the same date.
Now I need Measures to find out:
Any ideas? Help is much appreciated!
Thanks
Chris
Hi @Chrispi85 ,
Here're the measures.
Returns the minimum price for each platform.
Min Price = CALCULATE(MIN('Table'[Price]),FILTER(ALLSELECTED('Table'),[Platform]=MAX('Table'[Platform])))
Counts the products on each platform are best priced.
Count = CALCULATE(DISTINCTCOUNT('Table'[ID]),FILTER(ALLSELECTED('Table'),[Platform]=MAX('Table'[Platform])&&[Price]=[Min Price]))
Percentage of best priced products for each platform.
Percentage = var _all=CALCULATE(DISTINCTCOUNT('Table'[ID]),FILTER(ALLSELECTED('Table'),[Platform]=MAX('Table'[Platform])))
return DIVIDE([Count],_all)
Best Regards,
Stephen Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Stephen,
thank you so much for the effort! I feel a bit lazy right now, that I actually posted a Screenshot and not a real table, so you had to newly build it...
Regarding your answer - It's not quite what I'm looking for. I need the min price for each product, not for the whole platform. So if the IDs where all the same 0.45 would be the min price for that ID. In the sample there should be other min prices for the other IDs i.e. 1.00 for 23093818.
Now again I'm posting a Screenshot 🙄 it's for my expected result:
Now, I kind of solved the problem by creating a new table in which I pivoted my Platform column and added columns for
This solves the problem for now but I don't think it's a very elegant way to do this. Anyway I feel like I will have to provide more specific details for the problem to help you find the elegant solution, so when I have time I will post here again with a pbix.
Until then - should I close the topic by accepting the solution or do nothing?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
101 | |
79 | |
72 | |
64 |
User | Count |
---|---|
141 | |
107 | |
100 | |
82 | |
74 |