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

The Fabric Community site will be in read-only mode on Monday, Feb 24 from 12:01 AM to 8 AM PST for scheduled upgrades.

Reply
smpa01
Super User
Super User

Left align calculation item for string

Is there any way for me to create a format string expression so that the desired calculation item(string) is left aligned

@BernatAgulloMVP @parry2k 

 

Set up

smpa01_0-1724097104548.png

 

They would be left aligned if they were of same length. But that is not possible, yt how can they be left aligned.

Did I answer your question? Mark my post as a solution!
Proud to be a Super User!
My custom visualization projects
Plotting Live Sound: Viz1
Beautiful News:Viz1, Viz2, Viz3
Visual Capitalist: Working Hrs
1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@smpa01 I think you will do left align in the matrix visual format pane for specific column:

 

parry2k_0-1724097348390.png

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

2 REPLIES 2
BernatAgulloAnt
Frequent Visitor

Default alignment will depend on base measure. If it's a number, (or blank?) it will be right aligned, if it's text it will be left aligned. If you want to have both and use the Calc group column in the columns of the visual is a bit tricky. I would try this.

 

Measure= blank() 

Precedence 20 your calc group

Precedence 10 a Calc group that depending on the selected value in your calc group replaces with 0 or with "" the selected measure

Precedence 20 your calc group.

 

But I'm thinking this will not work

 

Different approach have two base measures, zero and Empty string

Then in your calc group and some logic so that left aligned Calc items only work on the zero and right aligned in the empty string. But maybe that does not work either

 

Tricky! 

parry2k
Super User
Super User

@smpa01 I think you will do left align in the matrix visual format pane for specific column:

 

parry2k_0-1724097348390.png

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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