Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
SH0lm3s
Frequent Visitor

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

1 ACCEPTED SOLUTION
Samarth_18
Community Champion
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:-

Samarth_18_0-1641833416903.png

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

View solution in original post

5 REPLIES 5
Samarth_18
Community Champion
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:-

Samarth_18_0-1641833416903.png

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

Thank you - very appreciated

parry2k
Super User
Super User

@SH0lm3s what is the logic to remove the first row, because it falls in this week, what defines the week? Sun - Sat, Mon - Sun??



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.

parry2k
Super User
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 YouTube.gif 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.



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.

Thanks for that.

For example this is my starting file

Date RequiredOrder/ForecastValue
10/01/2022Forecast10
10/01/2022Order20
17/01/2022Forecast15
17/01/2022Order25

 

And I'd like to get to this:

Date RequiredOrder/ForecastValueDate Created
10/01/2022Order2010/01/2022
17/01/2022Forecast1510/01/2022
17/01/2022Order2510/01/2022

 

Is there a best way to do this when transforming the data? If yes how can I learn? Thanks

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.