Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello,
I need some help. I have below conditional colum.
= Table.AddColumn(#"Rozwinięty element QR7", "QR7.shift.SQL", each if [QR7.shift] = "A" then "C" else if [QR7.shift] = "B" then "A" else if [QR7.shift] = "C" then "B" else [QR7.shift])
This code is valid for only until Year = 2023, Month = P03 & Week = WK09. Since Week 10 above code was fixed on SQL server. I don't need this anymore for further data but I need this code for past data.
Can you help me how to tweak his code to be valid only until week 09 2023 ?
Thank you
Solved! Go to Solution.
Again thanks for feedback. I have modified you code to below & it solved my issue:
= Table.AddColumn(#"Rozwinięty element QR7", "QR7.shift.SQL", each if[WC_Date]>"2023P03WK09" then [QR7.shift] else if [QR7.shift] = "A" then "C" else if [QR7.shift] = "B" then "A" else if [QR7.shift] = "C" then "B" else [QR7.shift])
= Table.AddColumn(#"Rozwinięty element QR7", "QR7.shift.SQL", each if[Year]>=2023 and [Week]>="WK 09" then QR7.shift] else if [QR7.shift] = "A" then "C" else if [QR7.shift] = "B" then "A" else if [QR7.shift] = "C" then "B" else [QR7.shift])
Again thanks for feedback. I have modified you code to below & it solved my issue:
= Table.AddColumn(#"Rozwinięty element QR7", "QR7.shift.SQL", each if[WC_Date]>"2023P03WK09" then [QR7.shift] else if [QR7.shift] = "A" then "C" else if [QR7.shift] = "B" then "A" else if [QR7.shift] = "C" then "B" else [QR7.shift])
Thanks for feedack. I have copied & pasted your code & I have below error:
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
27 | |
12 | |
11 | |
11 | |
9 |
User | Count |
---|---|
53 | |
30 | |
15 | |
14 | |
13 |