SSRS report - 100% stacked bar base on one column

mark goldin 691 Reputation points

I need to show a chart like this:


Can I show it with this data:

Name Count

ABC 30

where green is 30% and black is 70% to make it 100%.


SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,822 questions
0 comments No comments
{count} votes

Accepted answer
  1. Olaf Helper 41,101 Reputation points

    One way is to calculate the rest up to 100 already in the SQL query.
    Imagine "test" is your table with the figures, then this should work.

    ;with test as
        (select 'ABC' AS Name, 30 AS Cnt)
    SELECT *
    FROM test
    -- Calculate the rest up to 100
           100.0 - (SELECT SUM(cnt) FROM test)
    0 comments No comments

0 additional answers

Sort by: Most helpful