Forum Discussion
Omnia24
3 years agoNew Member
Dynamic Values in text box using DAX functions
Hello, I want to create a text box with a dynamic values, something like smart narrative but customized. I have Business Name, Weight, and Year columns, I'm new to DAX functions, and I want some hel...
Udbz
3 years agoRegular Visitor
Your best bet is to use smart narrative. Simple string concats also work.
For eg. create a measure for all the stuff u looking for
business name: SELECTEDVALUE( Table[businessname])
WEIGHTS sum: SUM( Table[WEIGHTS])
For the second third and forth highest weight u shud define what ur basis of such classification and then. This measure:
var mytable=SUMMARIZE( table, [basiscolumn1], [basiscolumn2],.... and more u want)
var mytable2=ADDCOLUMNS(mytable,"sum of weights", calculate(sum( weights)))
var mytable3=ADDCOLUMNS(mytable2, "rank", rankx(mytable2,,[sum of weights])
var mysumx=sumx(filter(mytable3,[rank]=3)),[sum of weights])
Return
mysumx