• Skip to main content
  • Skip to header right navigation
  • Skip to site footer

My Online Training Hub

Learn Dashboards, Excel, Power BI, Power Query, Power Pivot

  • Courses
  • Pricing
    • Free Courses
    • Power BI Course
    • Excel Power Query Course
    • Power Pivot and DAX Course
    • Excel Dashboard Course
    • Excel PivotTable Course – Quick Start
    • Advanced Excel Formulas Course
    • Excel Expert Advanced Excel Training
    • Excel Tables Course
    • Excel, Word, Outlook
    • Financial Modelling Course
    • Excel PivotTable Course
    • Excel for Customer Service Professionals
    • Excel for Operations Management Course
    • Excel for Decision Making Under Uncertainty Course
    • Excel for Finance Course
    • Excel Analysis ToolPak Course
    • Multi-User Pricing
  • Resources
    • Free Downloads
    • Excel Functions Explained
    • Excel Formulas
    • Excel Add-ins
    • IF Function
      • Excel IF Statement Explained
      • Excel IF AND OR Functions
      • IF Formula Builder
    • Time & Dates in Excel
      • Excel Date & Time
      • Calculating Time in Excel
      • Excel Time Calculation Tricks
      • Excel Date and Time Formatting
    • Excel Keyboard Shortcuts
    • Excel Custom Number Format Guide
    • Pivot Tables Guide
    • VLOOKUP Guide
    • ALT Codes
    • Excel VBA & Macros
    • Excel User Forms
    • VBA String Functions
  • Members
    • Login
  • Blog
  • Excel Webinars
  • Excel Forum
    • Register as Forum Member
  • Login

Custom Column error - seeking nested IF results from date range |Power Query|Excel Forum|My Online Training Hub

You are here: Home / Custom Column error - seeking nested IF results from date range |Power Query|Excel Forum|My Online Training Hub
Avatar
sp_LogInOut Log In sp_Registration Register
sp_Search Search
Advanced Search|Last Search Results
Search
Forum Scope




Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
sp_Search Search
sp_RankInfo
Lost password?
sp_CrumbsHome HomeExcel ForumPower QueryCustom Column error - seeking neste…
sp_PrintTopic sp_TopicIcon
Custom Column error - seeking nested IF results from date range
Avatar
Ian Innes

New Member
Members
Level 0
Forum Posts: 2
Member Since:
November 12, 2021
sp_UserOfflineSmall Offline
1
November 12, 2021 - 5:14 pm
sp_Permalink sp_Print

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.pngImage Enlarger

Screenshot-2021-11-12-163059-1.pngImage Enlarger

 

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

sp_PlupAttachments Attachments
  • sp_PlupImage Screenshot-2021-11-12-170304.png (21 KB)
  • sp_PlupImage Screenshot-2021-11-12-163059-1.png (6 KB)
sp_AnswersTopicSeeAnswer See Answer
Avatar
Velouria
London or thereabouts
Moderator
Members


Trusted Members

Moderators
Level 4
Forum Posts: 689
Member Since:
November 1, 2018
sp_UserOfflineSmall Offline
2
November 12, 2021 - 6:41 pm
sp_Permalink sp_Print

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

sp_AnswersTopicAnswer
Answers Post
Avatar
Ian Innes

New Member
Members
Level 0
Forum Posts: 2
Member Since:
November 12, 2021
sp_UserOfflineSmall Offline
3
November 15, 2021 - 10:23 am
sp_Permalink sp_Print

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

sp_Feed
Go to top
Forum Timezone: Australia/Brisbane
Most Users Ever Online: 245
Currently Online: Edson Lima, Peter Venkatrao, Ted Eggleston, Ronald White
Guest(s) 10
Currently Browsing this Page:
1 Guest(s)
Top Posters:
SunnyKow: 1432
Anders Sehlstedt: 880
Purfleet: 414
Frans Visser: 346
David_Ng: 306
lea cohen: 237
Jessica Stewart: 219
A.Maurizio: 213
Aye Mu: 201
Hans Hallebeek: 185
Newest Members:
thong nguyen
Appiagyei Kofi Frimpong
Hilary Burchfield
Richie Wright
Adel Kock
Barbara Murray
Doug Milne
Siobhan Stringer
Rob Rooth
Tom Lewis
Forum Stats:
Groups: 3
Forums: 24
Topics: 6542
Posts: 28644

 

Member Stats:
Guest Posters: 49
Members: 32830
Moderators: 2
Admins: 4
Administrators: Mynda Treacy, Philip Treacy, Catalin Bombea, FT
Moderators: Velouria, Riny van Eekelen
© Simple:Press —sp_Information

Sidebar

Blog Categories

  • Excel
  • Excel Charts
  • Excel Dashboard
  • Excel Formulas
  • Excel Office Scripts
  • Excel PivotTables
  • Excel Shortcuts
  • Excel VBA
  • General Tips
  • Online Training
  • Outlook
  • Power Apps
  • Power Automate
  • Power BI
  • Power Pivot
  • Power Query
microsoft mvp logo
trustpilot excellent rating
Secured by Sucuri Badge
MyOnlineTrainingHub on YouTube Mynda Treacy on Linked In Mynda Treacy on Instagram Mynda Treacy on Twitter Mynda Treacy on Pinterest MyOnlineTrainingHub on Facebook

Sign up to our newsletter and join over 400,000
others who learn Excel and Power BI with us.

 

Company

  • About My Online Training Hub
  • Disclosure Statement
  • Frequently Asked Questions
  • Guarantee
  • Privacy Policy
  • Terms & Conditions
  • Testimonials
  • Become an Affiliate
  • Sponsor Our Newsletter

Support

  • Contact
  • Forum
  • Helpdesk - For Technical Issues

Copyright © 2023 · My Online Training Hub · All Rights Reserved. Microsoft and the Microsoft Office logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries. Product names, logos, brands, and other trademarks featured or referred to within this website are the property of their respective trademark holders.