Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have a table that displays text strings in the body, ie in the "values". These values are typical single or pairs of words, "dance", "Crime", " "New Age", "Period Drama"
Sometimes the strings are longer words, and you cant see the whole word.
Rather than use wordwrap, I want to make the font dynamic so say a 3 letter word in a cell would appear larger in font size then a 8 letter word. Can font size in a table be made dynamic?
Hi @TomMartens ,thanks for the quick reply, I'll add further.
Hi @StephenF ,
Perhaps you can use the Html visual object.
The Table data is shown below:
1.Use the following DAX expression to create a table
Table = ADDCOLUMNS(SUMMARIZE('Sales_Table','Sales_Table'[Product],"Total",SUM(Sales_Table[Amount])),"Length",LEN([Product]))
2.Use the following DAX expression to create a column in 'Table'
Column =
VAR _a = SWITCH(TRUE(),
[Length] <=5,"5",
[Length] >5 && [Length] <=14,"3",
[Length] >14,"1"
)
VAR _average = CALCULATE(AVERAGE('Table'[Total]),ALL('Table'))
VAR _b = SWITCH(TRUE(),
[Total] < _average,"red",
"black")
RETURN "<tr>" & "<td style= width:150px;><font size=" & _a & ">" & [Product] & "</font></td>" & "<td align=left><font size = 3>" & "Sales: </font>" &
"<font color=" & _b & ">" &
[Total] & "</font></td>" & "</tr>"
3.Use the following DAX expression to create a measure
Measure =
VAR _a = CONCATENATEX('Table',[Column])
VAR _b = SUM('Sales_Table'[Amount])
RETURN "<table >" &
"<tr>" & "<td><font size = 6>Product</font></td>" & "<td><font size = 6>Sum of Amount</font></td>" & "</tr>" &
"<td colspan = 2><hr style = border-color:blue;></td>" &
_a &
"<td colspan = 2><hr style = border-color:blue;></td>" &
"<tr>" & "<td><font size = 6>Total</font></td>" & "<td align=right><font size = 6>" & _b & " </font></td>" & "</tr>" &
"</table>"
4.Final output
Hey @StephenF ,
unfortunately the answer is - No!
The font size of values of the table/matrix visual are not dynamic.
Regards,
Tom
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
71 | |
70 | |
43 | |
31 | |
26 |
User | Count |
---|---|
89 | |
49 | |
44 | |
38 | |
37 |