SSAS角色设置

时间:2016-08-10 09:26:10

标签: sql-server ssas business-intelligence

我有一个用户需要访问2个不同的国家/地区,并根据该值填充其他属性的成员集。

因此,对于Country属性,我有:

{[Sell To Customer].[Country Code].&[BE], [Sell To Customer].[Country Code].&[NL]}

现在,当国家/地区代码属性为" BE"那么这个用户应该只能使用值" FOOD"访问[Dim12 Name]。如果国家/地区代码属性为" NL"那么他应该在[Dim 12 Name]属性中看到所有可能的值。

目前我有这个,但它似乎不起作用:

IIF( [Sell To Customer].[Country Code].&[BE], {[Sell To Customer].[Dim12 Name].&[FOOD]},  IIF( [Sell To Customer].[Country Code].&[NL], {[Sell To Customer].[Dim12 Name].ALLMEMBERS},  "" ) )

有没有人知道另一种方式或解决我的问题?

KR,

凯文

1 个答案:

答案 0 :(得分:0)

import UIKit

private var child1Context = 1

class ViewController: UIViewController {

var child1 = ChildrenViewController()

override func viewDidLoad() {
    super.viewDidLoad()

    self.child1.setValue("George", forKey: "name")
    self.child1.setValue(15, forKey: "age")
}

override func viewWillAppear(animated: Bool) {
    super.viewWillAppear(animated)

    child1.addObserver(self, forKeyPath: "name", options: [.New,.Old], context: &child1Context)
    child1.addObserver(self, forKeyPath: "age", options: [.New, .Old], context: &child1Context)

    self.child1.name = "Michael" //set the name String
    self.child1.setValue(20, forKey: "age")
}

override func viewWillDisappear(animated: Bool) {
    super.viewWillDisappear(animated)

    self.child1.removeObserver(self, forKeyPath: "name")
    self.child1.removeObserver(self, forKeyPath: "age")
}

override func observeValueForKeyPath(keyPath: String?, ofObject object: AnyObject?, change: [String : AnyObject]?, context: UnsafeMutablePointer<Void>) {
    if context == &child1Context {
        if keyPath == "name" {
            print("The name of FIRST has been changed, \(change)")
        }
        if keyPath == "age" {
            print("The age of FIRST has been changed, \(change)")
        }
    }               
    }

}