Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Report STyle Expand / Collapse
Author
Message
Posted Wednesday, April 23, 2014 2:53 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: 2 days ago @ 9:09 AM
Points: 215, Visits: 638
I need to graphically display the following :


Location Capacity FreeCapacity
Europe 500 250
Asia 400 50
Africa 400 300

I saw somewhere like a bar which was half shaded with another color.
I tried to replicate with the above fields but Bar chart gets all messed up as all these are calculated fileds such as

Location Capacity FreeCapacity
Europe EUCapacity EUFree
Asia ACapacity AFree
Africa AFCapacity AF_Free

How can I resolve this?
Post #1564459
Posted Thursday, April 24, 2014 12:28 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 12:03 AM
Points: 13,312, Visits: 10,179
Remember we cannot see what you can see/think.
It is not entirely clear what you want to achieve.

What do you mean with calculated fields? What is your source?




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1564538
Posted Saturday, April 26, 2014 8:28 PM
Say Hey Kid

Say Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey KidSay Hey Kid

Group: General Forum Members
Last Login: Yesterday @ 11:45 PM
Points: 709, Visits: 4,520
I think I managed to reproduce your problem... and I think I solved it.

First off, some data to play with that I used as the data source for my report:
SELECT        'Europe' AS Location, 500 AS Capacity, 250 AS FreeCapacity
UNION ALL
SELECT 'Asia' AS Expr1, 400 AS Expr2, 50 AS Expr3
UNION ALL
SELECT 'Africa' AS Expr1, 400 AS Expr2, 300 AS Expr3

In my report, I added a couple of calculated fields:
UsedCapacity =Fields!TotalCapacity.Value-Fields!FreeCapacity.Value
PercentUsed =(Fields!TotalCapacity.Value-Fields!FreeCapacity.Value)/Fields!TotalCapacity.Value

Then in my report, I added a tablix with
Location, TotalCapacity, FreeCapacity, UsedCapacity...

Then I added a DataBar and set PercentUsed as the source. The important part to get the data bar to format correctly was to set the following Horizontal Axis Properties of the data bar:
Minimum: 0
Maximum 1 (100%)

then my data bar formatted properly (so 25% was half as wide as 50%, as it should be!). Before that, I got all kinds of weird widths that weren't proportional.


  Post Attachments 
SSC01.rdl (0 views, 30.09 KB)
Post #1565386
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse