Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
I am trying to achieve correct alignment in Powerbi paginated report. As shown in below image the percentage value are not straight aligned . I want that multiple values for single expression to aligned in straight line. Can we achieve this.
Expression used for above textbox is below.
=Code.GetFormatElections(LookupSet(Fields!ActiveElectionsId.Value, Fields!electionid.Value, Fields!CusipShort.Value & "~" & Fields!value.Value, "Elections"))
And custom code used in report properties is :
Public Function GetFormatElections(ByVal items As Object()) As String
Dim str as String
str = ""
For Each line As Object In items
Dim fund as string = split(line, "~").GetValue(0)
Dim percent as integer = split(line, "~").GetValue(1)
Dim percentF as string = format(percent, "F2") & "%"
if (percent > 0) then
str = str & fund & space(20) & percentF & vbCRLF
end if
Next
return str
End Function
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 10 | |
| 5 | |
| 5 | |
| 4 | |
| 3 |