PowerBI slicer value passing to query

六月ゝ 毕业季﹏ 提交于 2021-02-11 12:15:34

问题


I have a report generated from a SQL query, having a due date column. My requirement is to create a slicer and  whatever the date a user selects in the slicer the report should show all the data where due date is less than the selected slicer date.

I am not able to pass the slicer date to my SQL query. 

Can you guide me guys in finding the best possible way?


回答1:


This is not possible in general. Slicers and filters set on a report page cannot modify the model (e.g. calculated tables or calculated columns) and cannot modify the queries.

The only possible way to do this sort of thing is with a DirectQuery, which does it automatically in the background since it dynamically queries only the needed data. Otherwise, you need to pre-load all of the data that you intend to use in the report.

Using DirectQuery has significant limitations and may or may not work for your use case. Please check the limitations and considerations in the linked documentation for details.



来源:https://stackoverflow.com/questions/61638112/powerbi-slicer-value-passing-to-query

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!