Forum Discussion
Container size fitting
Hello,
I'm trying to fit the Card display so the text fits nicely/tightly between the Location and Address information -- i've tried reducing padding, font, etc but the text still gets cut off. I essentially want to create individual card containers for each of the fields so is there a way to do this so each container doesn't interfere with the others?
Hi bobekryant,
Yes. If you are using the current Card visual, I would make Entity and Address separate cards rather than trying to squeeze both into the same card layout.
The current Card visual lets you add multiple values, with each value displayed as its own card inside the visual. Under Format visual > Multi-card layout, you can also enable Fixed size and give the cards explicit dimensions, so one longer value does not force the other cards to continually resize.
You can then use Apply settings to in the formatting pane to format Entity and Address individually.
If you need completely different widths, heights or positions for each field, I would go one step further and use a separate Card visual for each field. That gives you full control over the available space for a longer Entity value without affecting Address.
So I would avoid solving this mainly through smaller fonts/padding. Separate card containers, either within the new Card visual or as individual visuals, should give you much cleaner control.
AI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.
6 Replies
- v-saisrao-msft
Community Support
HI bobekryant,
Checking in to see if your issue has been resolved. let us know if you still need any assistance.
Thank you.
- v-saisrao-msft
Community Support
Hi bobekryant,
Have you had a chance to review the solution shared by ShivekMaharaj Murtaza_Ghafoor ShahRukhSameer MasonMA ? If the issue persists, feel free to reply so we can help further.
Thank you.
- MasonMA
Super User
If you're trying to reproduce something very close to an existing medical/financial form, an HTML Content-type custom visual can be effective.
Tell AI what spacing, widths, padding, border, backgrounds etc. you are looking and have it generate html code, use this code in a Measure for html visual. - ShahRukhSameer
Continued Contributor
Hi bobekryant,
I think the limitation here is the Card visual itself. Power BI doesn't have a setting that automatically resizes a Card/container based on the amount of text in a field.
If the Location, Entity and Address are separate fields/cards, I’d avoid trying to make the container dynamically resize. Instead, use one measure that combines the three values and display it in a single Card (or a text box where appropriate). That way the text can wrap within one controlled area rather than having three separate containers fighting for space.
For example:
Location: [Location]
Entity: [Entity]
Address: [Address]If you need the fields to remain separate, the practical workaround is to give the Address/Entity area a fixed height and enable text wrapping where the visual supports it. You can also reduce the inner padding, but there isn't currently a dynamic “fit container to text” option.
For this particular layout, I'd probably use a single multi-row card for Location, Entity and Address and control the spacing there. It will be much easier to keep the three values aligned when the selected Entity/Address changes length.
- Murtaza_Ghafoor
Super User
If you are using the new Power BI Card, the problem is usually the internal layout. Changing font size or padding will not always fix it.
My suggestion after doing some search, It is better to use a different Card visual for each field instead of putting Location and Address together in one Card.
What you should do:
- Make separate Cards: Create one Card visual for each field, like Location, Address, and City.
- Clean the design: Turn off backgrounds, borders, and category labels.
- Adjust spacing: Set the padding and size for each Card on its own. Make each box fit its exact text size.
- Group them: Put a background shape behind all the Cards and group them together to make them look like one big box.
- Handle long text: Turn on text wrapping for long addresses. You can also use a Multi-Row Card or Table visual if some addresses are very long.
This stops the Location text from pushing or shrinking the Address space. Separate Cards give you the better control over your report design and overall customization.
If this helps, ✓ Mark as Kudos | Help Other - ShivekMaharaj
Solution Sage
Hi bobekryant,
Yes. If you are using the current Card visual, I would make Entity and Address separate cards rather than trying to squeeze both into the same card layout.
The current Card visual lets you add multiple values, with each value displayed as its own card inside the visual. Under Format visual > Multi-card layout, you can also enable Fixed size and give the cards explicit dimensions, so one longer value does not force the other cards to continually resize.
You can then use Apply settings to in the formatting pane to format Entity and Address individually.
If you need completely different widths, heights or positions for each field, I would go one step further and use a separate Card visual for each field. That gives you full control over the available space for a longer Entity value without affecting Address.
So I would avoid solving this mainly through smaller fonts/padding. Separate card containers, either within the new Card visual or as individual visuals, should give you much cleaner control.
AI-assisted drafting: AI was used to help structure and phrase this response. I reviewed and validated the technical content before posting.