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.
Hi Everyone,
We are working on P/L and Financials reporting in power bi and have lot of derived measures whose definitions are bound to change on frequnent basis based on User requirement. Hence planning to keep the dax formula dynamic.
We could manage dynamic row addtions using "SWITCH" and Variables. But when we try to retrieve the formulae stored in a table against every "Account Name", it returns literal string rather that evaluating the formula.
Any help is appreciated.
Scenario:
Account (Dimension):
Elimination (Fact):
Fact (Fact):
Measure Table:
Requirement : In the above table visual, we need the "Amount Derived 1" measure to dynamically calculate the value from the stored DAX expression or the [Table].[column] set up in Account Dimension.
Solved! Go to Solution.
Hi @Anonymous ,
Unfortunately, formulas stored in tables cannot be switched, but measures can be changed dynamically based on the current row context.
See if it will help:
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you want to see progress you may want to vote for an existing idea or create a new one.
Hi,
This is the exact same problem I've been having with something i'm working on. I want to be able to dynamically pick up the DAX formulae from the tables in the load and haven't found a way of being able to pick up the string and execute it. Like you, i've just ended up seeing the string.
I was hoping there might be a way that one could change the definition of measures during the load phase, but it seems there isn't. If anyone finds a way it would be good to hear it!
Hi @Anonymous ,
Unfortunately, formulas stored in tables cannot be switched, but measures can be changed dynamically based on the current row context.
See if it will help:
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks Liang, we have tried this alternative which makes us create those many measures and switch them on user input..was looking more from maintaining the DAX in table and picking it dynamically.
EVALUATE() is only available in external tools like DAX Studio. You cannot do that in Power BI Desktop DAX (yet).
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 |
---|---|
13 | |
2 | |
2 | |
1 | |
1 |