微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

具有SSAS数据源的SSRS中的订单参数值

如何解决具有SSAS数据源的SSRS中的订单参数值

我正在使用VS / SSDT构建报告,并尝试对来自SSAS(表格)数据源的参数列出的可用值进行排序。在模型中,我用适当的排序填充了月份名称的“按列排序”属性,当我在“数据集属性”窗口中使用“查询设计器”构建查询时(以及当我通过Excel连接时),它可以工作。但是,当我在报表预览中或发布后查看参数时,月份名称列将按字母顺序而不是根据我的排序列进行排序。

如何定义参数值的排序?

如果有帮助,我正在使用sql 2016,这是生成查询

DEFINE VAR vConsultantsReportingConsultantNameReporting1 = IF(PATHLENGTH(@ConsultantsReportingConsultantNameReporting) = 1,IF(@ConsultantsReportingConsultantNameReporting <> "",@ConsultantsReportingConsultantNameReporting,BLANK()),IF(PATHITEM(@ConsultantsReportingConsultantNameReporting,2) <> "",PATHITEM(@ConsultantsReportingConsultantNameReporting,2),BLANK()))
VAR vConsultantsReportingConsultantNameReporting1ALL = PATHLENGTH(@ConsultantsReportingConsultantNameReporting) > 1 && PATHITEM(@ConsultantsReportingConsultantNameReporting,1,1) < 1
VAR vTimesheetDateFisYearNumber1 = IF(PATHLENGTH(@TimesheetDateFisYearNumber) = 1,IF(@TimesheetDateFisYearNumber <> "",@TimesheetDateFisYearNumber,IF(PATHITEM(@TimesheetDateFisYearNumber,PATHITEM(@TimesheetDateFisYearNumber,BLANK()))
VAR vTimesheetDateFisYearNumber1ALL = PATHLENGTH(@TimesheetDateFisYearNumber) > 1 && PATHITEM(@TimesheetDateFisYearNumber,1) < 1
VAR vTimesheetDateFisMonthName1 = IF(PATHLENGTH(@TimesheetDateFisMonthName) = 1,IF(@TimesheetDateFisMonthName <> "",@TimesheetDateFisMonthName,IF(PATHITEM(@TimesheetDateFisMonthName,PATHITEM(@TimesheetDateFisMonthName,BLANK()))
VAR vTimesheetDateFisMonthName1ALL = PATHLENGTH(@TimesheetDateFisMonthName) > 1 && PATHITEM(@TimesheetDateFisMonthName,1) < 1
VAR vTimesheetDateFisWeekNumber1 = IF(PATHLENGTH(@TimesheetDateFisWeekNumber) = 1,IF(@TimesheetDateFisWeekNumber <> "",@TimesheetDateFisWeekNumber,IF(PATHITEM(@TimesheetDateFisWeekNumber,PATHITEM(@TimesheetDateFisWeekNumber,BLANK()))
VAR vTimesheetDateFisWeekNumber1ALL = PATHLENGTH(@TimesheetDateFisWeekNumber) > 1 && PATHITEM(@TimesheetDateFisWeekNumber,1) < 1
EVALUATE SUMMARIZECOLUMNS('Consultants Reporting'[Consultant Name Reporting],'Company Territory'[Territory],'Commissions'[Com Commission Percent],'Customers'[Customer Number],'Customers'[Customer Name],FILTER(VALUES('Consultants Reporting'[Consultant Name Reporting]),((vConsultantsReportingConsultantNameReporting1ALL || 'Consultants Reporting'[Consultant Name Reporting] = vConsultantsReportingConsultantNameReporting1))),FILTER(VALUES('Timesheet Date'[Fis Year Number]),((vTimesheetDateFisYearNumber1ALL || 'Timesheet Date'[Fis Year Number] = VALUE(vTimesheetDateFisYearNumber1)))),FILTER(VALUES('Timesheet Date'[Fis Month Name]),((vTimesheetDateFisMonthName1ALL || 'Timesheet Date'[Fis Month Name] = vTimesheetDateFisMonthName1))),FILTER(VALUES('Timesheet Date'[Fis Week Number]),((vTimesheetDateFisWeekNumber1ALL || 'Timesheet Date'[Fis Week Number] = vTimesheetDateFisWeekNumber1))),FILTER(VALUES('Company'[Company Name]),('Company'[Company Name] = "ABC Company,Inc.")),FILTER(VALUES('SBU Reporting'[SBU Name Reporting]),('SBU Reporting'[SBU Name Reporting] = "Base") || ('SBU Reporting'[SBU Name Reporting] = "Gland")),"Reporting Bill Amount",[Reporting Bill Amount],"Reporting Gross Margin $",[Reporting Gross Margin $],"Reporting Gross Margin %",[Reporting Gross Margin %],"Reporting MTD Bill Amount",[Reporting MTD Bill Amount],"Reporting MTD Gross Margin $",[Reporting MTD Gross Margin $],"Reporting MTD Gross Margin %",[Reporting MTD Gross Margin %],"Reporting YTD Bill Amount",[Reporting YTD Bill Amount],"Reporting YTD Gross Margin $",[Reporting YTD Gross Margin $],"Reporting YTD Gross Margin %",[Reporting YTD Gross Margin %],"Reporting Com Commission Amount",[Reporting Com Commission Amount],"Reporting QTD Bill Amount",[Reporting QTD Bill Amount],"Reporting QTD Gross Margin $",[Reporting QTD Gross Margin $],"Reporting QTD Gross Margin %",[Reporting QTD Gross Margin %],"Reporting PYTD Gross Margin $",[Reporting PYTD Gross Margin $],"Reporting PYTD Bill Amount",[Reporting PYTD Bill Amount],"Reporting PYTD Gross Margin %",[Reporting PYTD Gross Margin %])

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。