Forum Discussion
Parameter with Query as Source
- 5 years ago
this
lol
FILTER('PFR Date','PFR Date'[PFR Week]=VALUE(" & Text.From(SELECTED_PFR_WEEK) & ")),"
Hello rh203
you can reference a list item like this {1,2,3,4}{0}. This code picks up the first item of your list.
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy
Thanks Jimmy,
Still a bit stuck..
I am using the below filter statement within a DAX query to send to the SSAS to retreive the data required but when I run it, I get the error message below also.
I'm using a single value (instead of a list) so not sure if I have used the correct DAX to drive this?
FILTER('PFR Date','PFR Date'[PFR Week]={SELECTED_PFR_WEEK}),
- Jimmy8015 years ago
Community Champion
Hello rh203
i don't know your variable SELECTED_PFR_WEEK if this is a text, list or a table. And what now is also not clear... do you want to make a DAX-statement in Power query or in Power BI?
supposing its in PowerQuery and your variable is a text
FILTER('PFR Date','PFR Date'[PFR Week]=" & SELECTED_PFR_WEEK & "),"If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy - rh2035 years ago
Helper I
Hi Jimmy,
Everything in power query (excel to be precise).
The 'variable' (single value) is of type whole number.
I tried what you proposed and get the below messagw - think I understand the reason but not clear on how to pass the value into the query as a number instead?
Thanks
- rh2035 years ago
Helper I
Hi,
No sorry I get this message:
It looks like it ipicking up the correct value (202040) from the SELECTED_PFR_WEEK value but it is not happy with the '&'
- Jimmy8015 years ago
Community Champion
Hello rh203
last try
FILTER('PFR Date','PFR Date'[PFR Week]=VALUE(" & SELECTED_PFR_WEEK & ")),"
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy - rh2035 years ago
Helper I
Hi,
No, not happy 😞
Thanks
- Jimmy8015 years ago
Community Champion
this
lol
FILTER('PFR Date','PFR Date'[PFR Week]=VALUE(" & Text.From(SELECTED_PFR_WEEK) & "))," - rh2035 years ago
Helper I
Perfect!
Thanks for sticking with it 🙂