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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Alignment issue in Paginated report

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.

Sarvina_Sawant_0-1677669936251.png

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

0 REPLIES 0

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.