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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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