Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi All
I have strange request whihc i am not able to get this from the Data. Below is my table with items in the row and hour in the column. I wante to calcuate % of stock avaliblity throug out the day. For whihc i have made the changes if stock is avalible then its 1 and if its out of stock then 0. I wanted to calculate the % of stock avaliblity. I am getting the data at the time when stockout or Stock in. I wanted to repeat the same value as the previos column value
This is how i am getting the data
Name | 7:00 | 8:00 | 9:00 | 10:00 | 11:00 | 12:00 | 13:000 | 14:00 | % Of avliblity |
Apple | 1 | 0 | 1 | ||||||
Orange | 1 | 0 | 1 | ||||||
Mango | 0 | ||||||||
Strawbery | 1 | 0 | 1 | ||||||
Pineapple | 1 | 0 | 1 | ||||||
Kiwi | 0 | 0 | 1 |
I wanted this to be showne as
Name | 7:00 | 8:00 | 9:00 | 10:00 | 11:00 | 12:00 | 13:000 | 14:00 | % Of avliblity |
Apple | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | |
Orange | 1 | 1 | 0 | 0 | 0 | 0 | 1 | 1 | |
Mango | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | |
Strawbery | 1 | 1 | 1 | 1 | 0 | 0 | 1 | 1 | |
Pineapple | 1 | 1 | 1 | 0 | 0 | 0 | 1 | 1 | |
Kiwi | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 1 |
Thank you in Advance for the solution if provided
@madhu718 yes in my solution it is already doing it, check in PQ, it is filling every hour with the previous values. Seems like you didn't paid the attention to the table in the solution.
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.
Hi Parry2K
I have gone through the PQ what you have sahared but my data is differant it is something like below. Time series is not in interval. When ever there is change in the status data will get updated along with the item name and pirticualr time
Hi @madhu718 ,
I'm sorry I still don't understand what you want the end result to be. Could you please explain the results you want based on the data you provided? I looked at the data you provided and found that the time field is not a whole point and there is no certain pattern. Finally, do we need to list whether each whole point is available or not? How do we determine if it is available? Does it depend on the field with the value "enable"?
Best Regards
@madhu718 see attached solution and output below. I hope this is what you are looking for
✨ Follow us on LinkedIn
Check my latest blog post The Power of Using Calculation Groups with Inactive Relationships (Part 1) (perytus.com) I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡ Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
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.
Hi Parry2K
Thanks for your responce, but the help what i am looking is not the % of total row. What i need is
If you look at the data what i have posted is once the item status is 1 and for next hour there is no value in the column (Apple at 7:00 AM is 1, but after 7:00 AM there is no Value untill 11:00 AM where it is changed to 0) what i am lookin for is can we repete the same value as the previous value
Once i get this solution then we can apply the solution what you have suggested to calucate the % of row total