powerbidaxssas

Is it possible to use the value from a table column as the text of a DAX formula for measure?


please tell me, is it possible to use the value from a table column as the text of a DAX formula for measure? In dimention table will store the following values:

Column of Dimention with formula
=sum('Table 1'[Value_1])
=(1 * sum('Table 1'[Value_1])/sum('Table 1'[Value_2])
=avg('Table 1'[Value_1])

And I want to use these values ​​as a DAX depending on the element dimention. In order to create these formulas at the database level without editing the SSAS Tabular project itself?

A very rough idea of ​​what it might look like:

Measure = 
VAR MeasureFormula= LOOKUPVALUE(
            'Dimention'[Column of Dimention with formula],
            'Dimention'[ID], 'Table 1'[Dimetion ID]
            )
RETURN
MeasureFormula

I tried to specify different formulas in the SWITCH operator for different values of dimetion, but I need to solve the problem of adding new formulas without editing the SSAS project.


Solution

  • maybe you can create a selection table and use DAX to switch measures between different selection. pls see answer in another topic. enter link description here