Forum Discussion
Pass Parameter Values to Calculated Table Created in M
- 8 years ago
Yes, you could create 3 measures for P, i and n. Then, you could create a new table using the New Table under the Modeling tab of the ribbon. You will need to use GENERATESERIES.
I may have time to give you the exact answer later on tonight if I do not have too many beverages. I've already had several so no guarantees. But essentially, you would create a table with GENERATESERIES to create your initial table. The rest should be just adding columns to that table using the same basic math as in the Power Query code. You could refer to your measures in your code.
GENERATESERIES
https://msdn.microsoft.com/en-us/library/mt842624.aspx
Note that I also ponder whether or not a static table is really the most suitable vehicle for whatever it is that you are solving or whether a dynamic table would be better suited to the ultimate goal of what you are trying to achieve. But, I do not understand your ultimate goal, I assume it involves some version of taking over the world, but specifics would help. Unless it compromises your ultimate goal of world domination and in that case, I understand if you want to be cagey about things.
Hmmm, yeah that's a good question. How will you be sharing this report with others? To do it this way, you would need to share the PBIX file and then users could change the parameters before they refresh the query. Depending on how you want to share this, that is going to answer that question. This might have to be moved to DAX or potentially something else.
- Greg_Deckler8 years agoCommunity Champion
Yes, you could create 3 measures for P, i and n. Then, you could create a new table using the New Table under the Modeling tab of the ribbon. You will need to use GENERATESERIES.
I may have time to give you the exact answer later on tonight if I do not have too many beverages. I've already had several so no guarantees. But essentially, you would create a table with GENERATESERIES to create your initial table. The rest should be just adding columns to that table using the same basic math as in the Power Query code. You could refer to your measures in your code.
GENERATESERIES
https://msdn.microsoft.com/en-us/library/mt842624.aspx
Note that I also ponder whether or not a static table is really the most suitable vehicle for whatever it is that you are solving or whether a dynamic table would be better suited to the ultimate goal of what you are trying to achieve. But, I do not understand your ultimate goal, I assume it involves some version of taking over the world, but specifics would help. Unless it compromises your ultimate goal of world domination and in that case, I understand if you want to be cagey about things.
- sbone8 years agoFrequent VisitorThat’s hilarious. I’m exactly 1.5 beverages past being able to dig back in to this so brother ai understand.
I run a loan trading desk and when we get pools of loans in that I want to resell we create a Power BI report that’s basivally an online dashboard to show loan pool characteristics. My goal is to create a mechanism that will allow a client to take our report (viz), and calculate yields using different parameters, which would require a calculated table to be built on-the-fly inside of Power BI, since we can’t go back and change the source data in Excel. Truth is, though, that my wife is going to kill me if I spend any more time on this today, so I’m going to drink another beverage, watch Villanova dispatch Kansas, and wake up to fight with this another day. In all seriousness, I really appreciate your help here. I’ve sort of become an accidental data guy and I feel out of my element.- mrothschild7 years agoContinued Contributor
Realize I'm way late to this thread, but wondering if a DAX solution for calculated tables was every developed or work-around solved? I'm trying to accomplish something similar to the original question, but don't know M (and barely know DAX, have only been working with it for a few weeks).