Forum Discussion
Newbie help required - transforming data
Hi All,
I might be trying to run before I can walk but I'm abitious. I've got a data file cvs that I need to add a colunm when it is created in Power BI and the data in current week if set as forecast needs to be deleted. One is this possible and 2 where can I learn how to do this - thanks in advance for helping a newbie and point me in the right direction.
Sarah
Hi SH0lm3s ,
You can create a measure like below and use it as filter on your visual.
_filter = IF ( AND ( WEEKNUM ( MAX ( 'Order/Forecast'[Date Required] ) ) = WEEKNUM ( TODAY () ), MAX ( 'Order/Forecast'[Order/Forecast] ) = "Forecast" ), 0, 1 )Output:-
Thanks,
Samarth
5 Replies
- parry2k
Super User
SH0lm3s you can surely get great help here, it is always easy if you post some sample data in a table format with the expected output, it helps to provide an effective solution.
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✨ Follow us on LinkedIn and to our YouTube channel
Learn about conditional formatting at Microsoft Reactor
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.
- SH0lm3sFrequent Visitor
Thanks for that.
For example this is my starting file
Date Required Order/Forecast Value 10/01/2022 Forecast 10 10/01/2022 Order 20 17/01/2022 Forecast 15 17/01/2022 Order 25 And I'd like to get to this:
Date Required Order/Forecast Value Date Created 10/01/2022 Order 20 10/01/2022 17/01/2022 Forecast 15 10/01/2022 17/01/2022 Order 25 10/01/2022 Is there a best way to do this when transforming the data? If yes how can I learn? Thanks
- Samarth_18
Community Champion
Hi SH0lm3s ,
You can create a measure like below and use it as filter on your visual.
_filter = IF ( AND ( WEEKNUM ( MAX ( 'Order/Forecast'[Date Required] ) ) = WEEKNUM ( TODAY () ), MAX ( 'Order/Forecast'[Order/Forecast] ) = "Forecast" ), 0, 1 )Output:-
Thanks,
Samarth
- Syndicate_Admin
Administrator
Thank you - very appreciated