Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hello!
I want to have a parameter where I can use it on my measures (What If scenario is not applicable because it only accepts 4 digits), and I stumbled upon: Solved: Passing Parameters in measures - Microsoft Power BI Community
So I made my parameter and used it as a source for table query but it has the following error (I'm very new to Power Query and I do admit that I don't understand it much that's why I'm relying to samples on the web):
Here's my parameter:
Type: Any Value
Here's my query:
let
Source = data({"End Cash"},{{Param1}})
in
Source
Error:
Expression.Error: We cannot convert a value of type Table to type Function.
Details:
Value=[Table]
Type=[Type]
Any tips? My parameter is inside my soure table "data". Thanks!
Solved! Go to Solution.
Hi @crln-blue
When you use the table name data and then follow it with () PQ thinks you're calling a function. As data is a table, you get the error you are seeing.
What exactly are you trying to do?
It looks like you are trying to pass the string "End Cash" and the parameter into your data table for something. If you want to use the value for Param1 inside another query you can use its name.
Perhaps you can provide a screenshot of what your data table looks like and explain what you want to do with the string "End Cash" and the parameter.
regards
Phil
Proud to be a Super User!
Great, glad I was able to help.
Regards
Phil
If I answered your question please mark my post as the solution.
If my answer helped solve your problem, give it a kudos by clicking on the Thumbs Up.
Proud to be a Super User!
Hello again @PhilipTreacy !
I tried your suggestion and it worked! I simply places it in the let in the source. I was able to convert it into a table using the Convert To Table function. Thanks!
Hi @crln-blue
When you use the table name data and then follow it with () PQ thinks you're calling a function. As data is a table, you get the error you are seeing.
What exactly are you trying to do?
It looks like you are trying to pass the string "End Cash" and the parameter into your data table for something. If you want to use the value for Param1 inside another query you can use its name.
Perhaps you can provide a screenshot of what your data table looks like and explain what you want to do with the string "End Cash" and the parameter.
regards
Phil
Proud to be a Super User!
Hello @PhilipTreacy ! Thanks for the reply!
I want to use the parameter on my calculated measure. I saw somewhere that to be able to use it, I can pass it to a table. What If scenario won't work for me because I noticed that it only accepts up to 4 digits.
My data table is like this but has more columns. No computation on the data table since my computations are on a different table (summarized dax table):
So how do I use my parameter on a calculated measure? Thanks!
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
26 | |
12 | |
11 | |
11 | |
8 |
User | Count |
---|---|
53 | |
28 | |
16 | |
14 | |
13 |