Sql Microstrategy:使用下拉框Year,如何在网格中显示所选年份和上一年的值

Sql Microstrategy:使用下拉框Year,如何在网格中显示所选年份和上一年的值,sql,sql-server,microstrategy,Sql,Sql Server,Microstrategy,使用下拉选择器“年”属性(全部禁用),如何针对网格报告显示所选年份和上一年的值 例如: User selects year '2012' from the drop down, the grid should display values of metrics for year 2012 in one column and 2011 in another column for comparison purpose. Metric headers ar

使用下拉选择器“年”属性(全部禁用),如何针对网格报告显示所选年份和上一年的值

例如:

     User selects year '2012' from the drop down, 
     the grid should display values of metrics for year 2012 in one column 
     and 2011 in another column for comparison purpose. 
     Metric headers are rows and year attribute is column.
请注意,数据集是使用自由形式sql创建的


提前感谢

这可以通过微策略中的变换来实现。请通过链接了解更多详细信息。

但是,正如您所提到的,您正在使用一个自由形式的SQL,在本例中,编写另一个SQL过程,如下所示,并将此过程的结果与原始SQL过程的使用年份列连接起来

选择事实。年份,总和(事实。度量) 从事实联接查找 开启(Fact.Year=Lookup.Year-1)
按事实分组。年份

这里没有足够的信息。这将是一个很好的起点。