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

Cross tab report/Matrix

$
0
0

Hi Guys,

I have a requirements to make report that look like a cross tab using the dateandtime as column header and

should be by month. please see my sample.

I tried this in Matrix but not success. any idea guys? thanks in advance. 

CREATE TABLE #SAMPLE
(DATEANDTIME datetime,
MODEL nvarchar(35),
COREYPE nvarchar(35),
FG int,
SCRAP int,
TOTAL int,
YIELDPERCENT numeric(28,12))
INSERT  #SAMPLE
SELECT '2013-01-01','P245-3110-CONNECT-U','SAL',464,140,604,0.77 UNION ALL
SELECT '2013-01-01','P245-3110-CONNECT-U','Tri',32,7,39,0.82 UNION ALL
SELECT '2013-02-01','P245-3110-CONNECT-U','SAL',441,119,560,0.77 UNION ALL
SELECT '2013-03-01','P245-3110-CONNECT-U','SAL',443,81,524,0.85
select * from #SAMPLE
RESULT:
------------------------------	JANUARY 2013-------------------	FEBRUARY--------------------MARCH
MODEL-----------------CORETYPE-----FG----SCRAP---TOTAL YIELD| FG----SCRAP---TOTAL-- YIELD|
-----------------------------------------------------------------------------------------| 
P245-3110-CONNECT-U--- SAL--------464 -----140---604----0.77| 441---119------560--- 0.77 | 
P245-3110-CONNECT-U--- Tri--------32  ----- 7----39-----0.82| 


Viewing all articles
Browse latest Browse all 10045

Trending Articles



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