简体   繁体   中英

Create a measure based on a text in a columns (Dax, ssas)

I have a table which holds measure expressions. like this:

name | expression
all   sum(column)

I want to create a measure that evaluates the text in the expression. I have tried

calculate(selectedvalue(expression)filter(name = "all"))

But it gives me the "sum(column)" in the measure. I there a way that my measure will evaluate the "sum(column)"? Thanks.

No. There is no dynamic code evaluation in DAX. You'll need to create measures at design-time.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM