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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Value in Column A should be multiplied by 2 if the Date of Column B is prior to 31.01.2022

Hello Friends,

thanks for checking by!

 

My question is quite simple, i need to change incoming values which are now limited to 1 to 5 and will then be changed to 1 to 10.

 

The values pre 31.01.2022 shall be multiplied by 2 and the other shall remain untouched.

 

Is there a simple solution for this in any master-mind? (I would like to avoid a new column but i have the feeling that this will be hard)

 

 

Thanks in advance!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , A new column

if([Date] <date(2022,01,31) ,[Value column]*2, [Value Column])

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , A new column

if([Date] <date(2022,01,31) ,[Value column]*2, [Value Column])

Anonymous
Not applicable

Your solution gave me some "token right paren expected" error but i figured it can be done with following code on my dataset.

Thank you very much for the help!

 

= Table.AddColumn(#"Renamed Columns2", "NewValue", each if [Date] < #datetime(2022, 1, 1, 0, 0, 0) then [Value]*2 else [Value])

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.