The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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 help in the following:
your assitance is highly appreciated.
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
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
20 | |
12 | |
10 | |
7 |