Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
How do you format a DAX query to run when the its written in sql with a 'prompt parameter" like this example:
accept start char Prompt 'Enter Start Date:'
accept end char Prompt 'Enter End Date:'
SELECT petf.element_name "Element",
SUM(pdl.distribution_amount) "Amount",
ppp.proposed_salary_n "Salary",
to_char(ppl.effective_date, 'YYYY-MM') "Period",
paaf.employment_category
FROM (SELECT * FROM "Table_Name" WHERE effective_date BETWEEN '&Start' AND '&End') tbln
In this example sql prompts for a Start and End dates but in DAX, you will just get an error. It gets tedious when you have multiple prompts for effective dates.
Please help!
Solved! Go to Solution.
Hi @Anonymous,
I believe you are talking about the query editor correct? Probably you should create a parameter and then add it to your Query so that you can edit the parameters and have the expected result.
Check this link to try and have a first approach to what can be done.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous,
I believe you are talking about the query editor correct? Probably you should create a parameter and then add it to your Query so that you can edit the parameters and have the expected result.
Check this link to try and have a first approach to what can be done.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @Anonymous,
You can try doing this by steps, try firstly run this query:
SELECT petf.element_name, SUM(pdl.distribution_amount), ppp.proposed_salary_n , to_char(ppl.effective_date, 'YYYY-MM'), paaf.employment_category FROM (SELECT * FROM "Table_Name") tbln
If you get results you will get all data without start/end dates.
Now you can try to insert the start/end columns in your query and filter them.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
77 | |
68 | |
54 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |