cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jmoskovich Frequent Visitor
Frequent Visitor

Re: IF AND Statements in power query

Good Evening!

 

Yes, I'm willing to give any solutions a try at this point.

 

Thank you!

Super User
Super User

Re: IF AND Statements in power query

Hi,

Try this calculated column formula

=IF(AND([InvoiceDate]<=EOMONTH(TODAY(),-1),[InvoiceDate]>=EOMONTH(TODAY(),-4)+1),[ExtensionAmt],0)

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
jmoskovich Frequent Visitor
Frequent Visitor

Re: IF AND Statements in power query

Hi Ashish,

 

Isn't there a different formula "language" for PowerQuery?  The formula below is what is used inside of excel itself, but I'm trying to pulling the past 3 months of data prior to the data pulling into my exel sheet.

 

=IF(AND([InvoiceDate]<=EOMONTH(TODAY(),-1),[InvoiceDate]>=EOMONTH(TODAY(),-4)+1),[ExtensionAmt],0)

 

Thank you,

Super User
Super User

Re: IF AND Statements in power query

Hi,

There are 2 formula/coding languages in PBI desktop - Mashup or simple "M" used in the Query Editor and DAX used in PowerPivot (for writing measures).  My suggested formula is a DAX calculated column formula.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 55 members 893 guests
Please welcome our newest community members: