Quantcast
Channel: SQL Server Reporting Services, Power View forum
Viewing all articles
Browse latest Browse all 10045

Filter or column group

$
0
0

Hi all

Struggling to display some data how I would like and was wondering if anyone knew if it was possible?

The dataset has various JobTypes that have a SUM figure for 3 years, each client can have different JobTypes associated with it.

SELECT
  SUM(Practice.ibvSalesByJob.JobBilledExVAT) AS Sum_JobBilledExVAT
  ,Practice.ibvSalesByJob.JobType
  ,Practice.ibvSalesByJob.ClientId
  ,Practice.ibvSalesByJob.ClientName
  ,Practice.ibvSalesByJob.ClientPartner
  ,Practice.ibvSalesByJob.ClientManager
  ,Practice.ibvSalesByJob.ClientCategory4
  ,Practice.ibvSalesByJob.[Year]
FROM
  Practice.ibvSalesByJob
WHERE
  Practice.ibvSalesByJob.[Year] IN (2016, 2015, 2014)
GROUP BY
  Practice.ibvSalesByJob.JobType
  ,Practice.ibvSalesByJob.ClientId
  ,Practice.ibvSalesByJob.ClientName
  ,Practice.ibvSalesByJob.ClientPartner
  ,Practice.ibvSalesByJob.ClientManager
  ,Practice.ibvSalesByJob.ClientCategory4
  ,Practice.ibvSalesByJob.[Year]

I would like the table/matrix to display as follows

ClientID | JobType | 2016 | 2015 | 2014

CJJID | 1 | £45 | £40 | £42

         | 5 | £60 | £56 | £80

MJDID | 1 | £80 | £90 | £32

           | 6 | £45 | £34 | £54

I am grouping the above on Client ID and then wish it to display each years overall figure on the same line as the relevant JobType.  Unfortunately I can only get near to the desired results by creating a Column group for Year, which then displays the years figures on a separate line for each JobType like below

CJJID | 1 | £45

         | 1 |        | £40

         | 1 |        |         | £42

Hope this makes sense, I looked into filter but I could only see an option to filter the table.

Any help/advice appreciated

Cheers



Cheers Chris


Viewing all articles
Browse latest Browse all 10045

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>