Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
Omnia24
New 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 help in the following:

  • I want to show values of business name with max sum of weight.
  • business name with second highest sum of weight.
  • business name with third highest sum of weight.
  • business name with the highest total of sum of weight.
  • sum of weight for business name with the highest total of sum of weight as % of total.

your assitance is highly appreciated.

1 REPLY 1
Udbz
Regular 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

 

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.