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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
powerbiexpert22
Impactful Individual
Impactful Individual

card with segretion using bars

can it be possible to create below card in power bi ?. i tried using new card and create sperate chart but unable to combine both

pbix:

https://docs.google.com/spreadsheets/d/1VaOgc2zCR_lbG8CCtYvH4JYkynYvlfZ5/edit?usp=drive_link&ouid=10...

 

data:

https://drive.google.com/file/d/1l8NKF3K3iss5Mjwt05TqiiqRlxAz2AN_/view?usp=sharing

 

powerbiexpert22_1-1716456239801.png

 

powerbiexpert22_2-1716456360294.png

 

 

 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @powerbiexpert22 

 

Please try this:

First of all, I create a SVG measure:

Measure = 
"data:image/svg+xml;utf8,
<svg xmlns='http://www.w3.org/2000/svg' width='100' height='10'>
<rect x='0' y='0' width='"&100*[Private Count]&"' height='10' fill='deepskyblue'/>
<rect x='"&100*[Private Count]&"' y='0' width='"&100*[Public Count]&"' height='10' fill='blue'/>
<rect x='"&100*[Private Count]+100*[Public Count]&"' y='0' width='"&100*[Business Count]&"' height='10' fill='red'/>
<text x='"&100*[Private Count]&"' y='7' text-anchor='end' font-size='5'>"&100*ROUND([Private Count],2)&"%" &"</text>
<text x='"&100*[Private Count]+100*[Public Count]&"' y='7' text-anchor='end' font-size='5'>"&100*ROUND([Public Count],2)&"%" &"</text>
<text x='100' y='7' text-anchor='end' font-size='5'>"&100*ROUND([Business Count],2)&"%" &"</text>
</svg>"

Then add a new card:

vzhengdxumsft_0-1716531261070.png

Next, click formatting > visual > Images

Open the Image and select image url in image type:

vzhengdxumsft_1-1716531427637.pngvzhengdxumsft_3-1716531486280.png

The result is as follow:

vzhengdxumsft_4-1716531510074.png

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @powerbiexpert22 

 

Please try this:

First of all, I create a SVG measure:

Measure = 
"data&colon;image/svg+xml;utf8,
<svg xmlns='http://www.w3.org/2000/svg' width='100' height='10'>
<rect x='0' y='0' width='"&100*[Private Count]&"' height='10' fill='deepskyblue'/>
<rect x='"&100*[Private Count]&"' y='0' width='"&100*[Public Count]&"' height='10' fill='blue'/>
<rect x='"&100*[Private Count]+100*[Public Count]&"' y='0' width='"&100*[Business Count]&"' height='10' fill='red'/>
<text x='"&100*[Private Count]&"' y='7' text-anchor='end' font-size='5'>"&100*ROUND([Private Count],2)&"%" &"</text>
<text x='"&100*[Private Count]+100*[Public Count]&"' y='7' text-anchor='end' font-size='5'>"&100*ROUND([Public Count],2)&"%" &"</text>
<text x='100' y='7' text-anchor='end' font-size='5'>"&100*ROUND([Business Count],2)&"%" &"</text>
</svg>"

Then add a new card:

vzhengdxumsft_0-1716531261070.png

Next, click formatting > visual > Images

Open the Image and select image url in image type:

vzhengdxumsft_1-1716531427637.pngvzhengdxumsft_3-1716531486280.png

The result is as follow:

vzhengdxumsft_4-1716531510074.png

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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