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 September 15. Request your voucher.
Hi,
I have a data table that records the date of a particular event through two seperate fields. One records the day of the week that an event is held the other is a 53 character field that nominates which weeks the event is occuring.
an example of the data is
event_id - 591683
day_of_week - 1
Weeks - NNNYYYYYYYYYNNYYYYYYYYYYYNNYYYYYYYYYYNNYYYYYYYYYYNNNN
the result I am looking for is a column containing event id and a column containing the date of the event.
any assistance to transform the data would be appreciated.
Thanks
This will return the weeknumbers in a list:
List.Transform(Text.PositionOf([Column1], "Y", Occurrence.All), each _+1)
You can use it in a custom column. When you expand it, you should have 3 columns that then can be further combined to a date (#date(YYYY, MM, DD))
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries