Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/assembly/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reporting services 在SSRS堆叠条形图中将列分组为类别和系列_Reporting Services_Stacked Chart - Fatal编程技术网

Reporting services 在SSRS堆叠条形图中将列分组为类别和系列

Reporting services 在SSRS堆叠条形图中将列分组为类别和系列,reporting-services,stacked-chart,Reporting Services,Stacked Chart,我需要在SQl Server Reporting Services中制作一个堆叠条形图。 但是,数据位于一行中: Cat1Act | Cat1Inact | Cat2Act | Cat2Inact | Cat3Act | Cat4Act | Cat4Inact |Cat5Active | Cat5Inactive 52 | 61 | 25 | 55 | 35 | 1 | 4 | 3 | 12

我需要在SQl Server Reporting Services中制作一个堆叠条形图。 但是,数据位于一行中:

Cat1Act | Cat1Inact | Cat2Act | Cat2Inact | Cat3Act | Cat4Act | Cat4Inact |Cat5Active | Cat5Inactive
52      | 61        | 25      | 55        | 35      | 1       | 4         | 3         | 12 
这是通过Excel生成的所需图表:


如何在SSRS中将这些列分为相应的类别和系列?

您的示例数据没有多大意义。你能准确地将你想要反映在图表中的值张贴出来吗?我做了许多相同类型的图表,我相信如果我知道数据,我可以帮助你。很难在评论中描述,但你需要让数据集返回3列
(类别、状态、值)
。然后,您的行包含类似于
“Cat1”、“Active”、50的内容<代码>“Cat1”,“非活动”,50
<代码>“Cat2”,“活动”,22<代码>“Cat2”,“非活动”,56。之后,您可以按类别分组。@Viking-感谢您的帮助。编辑原始帖子,以包含用于生成图表的值。这就是数据在数据库中的存在方式。但是,我觉得Alan Schofield是正确的,我需要更改查询以将数据转换为适当的格式。