Forum Discussion
SSRS to Power BI Report
- 8 years ago
Hi diamond,
In Query Editor, you can create a Query Parameter named RunDate,
Then you can create a custom column based on the query parameter RunDate:
=if Date.From([DateOfService]) <= RunDate and
Date.From([BankDate]) > RunDate or
[BankDate] = null
then [Charges] else 0After apply change and load to data model, we can change parameter values by clicking Edit Parameters, enter expected date value and click Apply change.
You can also download attache sample file to have a look. One thing need to note that Query Parameter doesn't work after publish the report to Power BI service, you can vote this idea: https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/13820190-power-bi-online-query-parameters
Reference:
https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/Best Regards,
Qiuyun Yu
Hi diamond,
In Query Editor, you can create a Query Parameter named RunDate,
Then you can create a custom column based on the query parameter RunDate:
=if Date.From([DateOfService]) <= RunDate and
Date.From([BankDate]) > RunDate or
[BankDate] = null
then [Charges] else 0
After apply change and load to data model, we can change parameter values by clicking Edit Parameters, enter expected date value and click Apply change.
You can also download attache sample file to have a look. One thing need to note that Query Parameter doesn't work after publish the report to Power BI service, you can vote this idea: https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/13820190-power-bi-online-query-parameters
Reference:
https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/
Best Regards,
Qiuyun Yu
Thank you v-qiuyu-msft. That's exactly how I ended up doing. Thank you so much for your prompt reply. BTW, I was able to publish this to PowerBI service and I am able to choose the RunDate parameter (i.e. choose a date from calendar).
Thanks again for your prompt response.