Forum Discussion

pragya27's avatar
pragya27
Regular Visitor
1 year ago
Solved

Binding Date parameters

Hi,

 

I am trying to bind date parameter, but Unfortunately bind to parameter option is not visible.

Following the reference document - https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-dynamic-m-query-parameters

 

 

 

Please let me know if I am doing anything wrong.

 

Regards,

Pragya S

 

 

  • that will only work for columns that are part of a Direct Query data source. Yours likely is in Import mode.

  • lbendlin's avatar
    lbendlin
    1 year ago

    You need to bind the controlled field that is part of the direct query data source, not the controlling slicer column.

10 Replies

  • that will only work for columns that are part of a Direct Query data source. Yours likely is in Import mode.

  • v-nmadadi-msft's avatar
    v-nmadadi-msft
    Community Support

    Hi pragya27,
    Thanks for reaching out to the Microsoft fabric community forum.

    Other than the valuable point mentioned by lbendlin , Please check if the column data type is matching with the M parameter data type.

    Additionally please check out this limitation of Dynamic M query parameter: 

    • If your parameter is the Date/Time data type, you need to cast it within the M query as DateTime.Date(<YourDateParameter>).

    Source: 6th point Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn




    If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
    Thanks and Regards

    • pragya27's avatar
      pragya27
      Regular Visitor

      Yes Both the parameters are of same data type.

      But column is a part of import mode.

      I followed Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn and tried to implement the same.

      As per this blog, table has been created using StartDateTable = CALENDAR (DATE(2016,1,1), DATE(2016,12,31)).

      I implemented exactly whatever is mentioned in this blog. But unfortunately bind to parameter is not visible.

      Is this a bug? Looking for quick resolution as I am stuck with some urgent implementation.

       

      Thanks

       

      Regards,

      Pragya S

      • lbendlin's avatar
        lbendlin
        Super User

        You need to bind the controlled field that is part of the direct query data source, not the controlling slicer column.

  • v-nmadadi-msft's avatar
    v-nmadadi-msft
    Community Support

    Hi pragya27 ,

    May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

    Thank you.

     

  • v-nmadadi-msft's avatar
    v-nmadadi-msft
    Community Support

    Hi pragya27 ,

    I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If our responses has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.


    Thank you.

  • v-nmadadi-msft's avatar
    v-nmadadi-msft
    Community Support

    Hi pragya27 

    As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided by the community members for the issue worked. If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

     

    Thanks 

  • pragya27's avatar
    pragya27
    Regular Visitor

    Hi, Yes Mine is import mode and I have created Calendar table as mentioned in the document Dynamic M query parameters in Power BI Desktop - Power BI | Microsoft Learn. And as per steps mentioned I can see this StartDate is binded to Date Parameter.

    StartDateTable = CALENDAR (DATE(2016,1,1), DATE(2016,12,31))

     

    I followed the same steps.Please let me know if we can follow this documentation or if anything is wrong over there. 

    • v-nmadadi-msft's avatar
      v-nmadadi-msft
      Community Support

      Hi pragya27 ,

      At the moment, there are no known issues with the documentation, and no other users have reported similar concerns in the forum. Please try replicating the same steps in a new PBIX file to see if you're able to bind the parameter successfully.

      If you find this post helpful, please mark it as an "Accept as Solution" and consider giving a KUDOS. Feel free to reach out if you need further assistance.
      Thanks and Regards

  • v-nmadadi-msft's avatar
    v-nmadadi-msft
    Community Support

    Hi pragya27 

    Just checking in have you managed to resolve this issue? If so, kindly consider marking the helpful reply as the accepted solution. This helps other community members facing similar challenges find answers more quickly.

    Thank you!