Forum

Custom Column error...
 
Notifications
Clear all

Custom Column error - seeking nested IF results from date range

3 Posts
2 Users
0 Reactions
72 Views
(@ianduncan)
Posts: 2
New Member
Topic starter
 

Hi All, 

first time post. Self taught newbie on PQ. I have spent the day searching other threads for the answer to no avail, so here I am. Trying to follow the rules!

Experiencing - Expression.Error: We cannot apply operator < to types Number and Date. I get that this is probably a formating issue but I can't work out the fix.

Please see sanitised dummy workbook replicating problem. 

Data is appended sales data from 2 systems(formats) to cover a continuous sales period. New base data added weekly to folder before refresh in PQ. The transform part works perfectly!

The main game is producing a sales dashboard via pivots showing target revenue based on last FY (by month).  Enter my custom column for targets. Previously it worked but was a simple [Sale]*1.1 but now the sales team rightly want some adjustment to reflect reduced capacity during COVID lockdowns. I am using the formula below and getting the error shown:

Screenshot-2021-11-12-170304.png

Screenshot-2021-11-12-163059-1.png

 

Really hoping you can have a laugh at a simple problem and help me out!

Very happy to be told I need to reformat the data and use a different formula as I've considered that type of solution but felt date ranges should be something commonly done?

Regards

Ian

 
Posted : 13/11/2021 3:14 am
(@debaser)
Posts: 837
Member Moderator
 

Instead of using 1/07/20 try using #date(2020,7,1) and similarly for the other date literals.

 
Posted : 13/11/2021 4:41 am
(@ianduncan)
Posts: 2
New Member
Topic starter
 

Velouria, thank you! I have successfully tested that format change. I appreciate the help greatly. 

 
Posted : 15/11/2021 8:23 pm
Share: