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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
sdmikejr
Helper I
Helper I

How to pass the date parameters in PQ Query?

I have created my date table dynamically using M and it spans 2 years back and 2 years forward.

I have a step in my query that creates a calculated column to identify all dates for the current fiscal year:

 

FYTD: if ([Calendar Date] > #date(2016, 3, 31) and [Calendar Date] < #date(2017, 4, 1)) then "FYTD" else null).

 

This is great, but I really don't want to set something up that is not on auto pilot. As a result, I have created 2 parameters, "CurrentFiscalStartDate" and "CurrentFiscalEndDate". (YAY!) 

 

I was not able to find documentation on this but feel this should be fairly easy for all you experienced gurus.

I would like to pass these 2 parameters in the above FYTD statement instead of using the static #date(2016...) dates. 

 

Can someone please help me on this ? I will definitely leave a solution point for you for those who come forward and try 🙂

1 ACCEPTED SOLUTION
ankitpatira
Community Champion
Community Champion

@sdmikejr Click on Advaned Editor for the query for FYTD and pass parameter you've created as below. I think there shouldn't be any issue in passing date parameter as long as your parameter type is date.

 

Capture.PNG

View solution in original post

5 REPLIES 5
jennyjfoy
Regular Visitor

We provide best & high quality Microsoft 70-247 certification dumps - pdf for success in exams. Now you can avail special discount offers on all exams content.

ankitpatira
Community Champion
Community Champion

@sdmikejr Click on Advaned Editor for the query for FYTD and pass parameter you've created as below. I think there shouldn't be any issue in passing date parameter as long as your parameter type is date.

 

Capture.PNG

The easy way of preparing Microsoft Certifiactions exam is using pass4sure exam dumps. I found most of the questions from the dumps in the real exam. This is the best organization from certificated exam dumps. This site totally committed to provide 100% exact preparation material.

Hi Ankit,

 

Your answer perfeclty works fine when we pass single value in a parameter. 

 

I was trying to pass multiple values through parameter but getting an error. I tried 'in' instead of '=' but no luck.  Could you help me how to pass mutilple values in a parameter please?

 

Thanks

The easy way of preparing Microsoft Certification exam is using pass4sure exam dumps. Dumps4download provides the best of Microsoft Exam Questions with 100% Money back Guarantee. visit this site and check your exam preparations.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.