The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have a table, here is the example:
I'd like to add a new column which I don't know how to get (last one called "Prev day flag"
Explanation:
I have a table with lists of products (Item ID) and suppliers for each product.
Everyday I have a different flag for this product and I want to know what was the flag previous day. Not always days are +1, sometime it is +7, so then I want to know what was the flag 7 days ago
I tried to use CALCULATE + EARLIER function, but it doesn't work. As far as I know, we use calculate with metrics, but here I need a column...
Please help!:)
Solved! Go to Solution.
Thanks for the data.
Try this ..
Click here to download solution
Thanks for reaching out for help.
I put in a lot of effort to help you, now please quickly help me by giving kudos.
Remember we are unpaid volunteers and here to coach you with Power BI and DAX skills and techniques, not do the users job for them. So please click the thumbs up and accept as solution button.
If you give someone a fish then you only give them one meal, but if you teach them how to fish then they can feed themselves and teach others for a lifetime. I prefer to teach members on this forum techniques rather give full solutions and do their job. You can then adapt the technique for your solution, learn some DAX skills for next time and soon become a Power BI Super User like me.
One question per ticket please. If you need to extend your request then please raise a new ticket.
You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !
Thanks for the data.
Try this ..
Click here to download solution
Thanks for reaching out for help.
I put in a lot of effort to help you, now please quickly help me by giving kudos.
Remember we are unpaid volunteers and here to coach you with Power BI and DAX skills and techniques, not do the users job for them. So please click the thumbs up and accept as solution button.
If you give someone a fish then you only give them one meal, but if you teach them how to fish then they can feed themselves and teach others for a lifetime. I prefer to teach members on this forum techniques rather give full solutions and do their job. You can then adapt the technique for your solution, learn some DAX skills for next time and soon become a Power BI Super User like me.
One question per ticket please. If you need to extend your request then please raise a new ticket.
You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !
Thank you for your response. It doesn't work when I apply that in my original table, I think that I'd need another condition with the supplier and itemid, because I have a lot of ITEM IDs and suppliers for one Item ID, and it should be in there I guess...
Remember we are unpaid volunteers. 😀
I provided a working example solution using the exmaple data you provided.
So I will close this problem.
One question per ticket please. If you need to extend or change your pronlem dessription then please raise a new ticket.0
You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you !
Please provide example input data as table text (not a screen print) so we can import the data to build a solution for you.
Date | Item ID | Supplier | Product flag |
01.01.2022 | ABC | Maxdom | 0 |
02.01.2022 | ABC | Maxdom | 1 |
03.01.2022 | ABC | Maxdom | 1 |
04.01.2022 | ABC | Ablax | 1 |
05.01.2022 | ABC | Ablax | 0 |
01.01.2022 | DEF | Plot | 0 |
02.01.2022 | DEF | Plot | 1 |
03.01.2022 | DEF | Plot | 1 |
04.01.2022 | DEF | Plot | 0 |