Forum Discussion
Rich_F
3 years agoNew Member
Using field parameter in a count() measure
Hi, I was wondering if anyone has a way of using a selectedvalue from a field parmeter within a count measure. So, using a measure/varible rather than a column reference as an argument in the c...
nhniniras
3 years agoFrequent Visitor
Hi,
I have the same problem and have solved it with a Swithc function (but I guess there should be a more simple solution)
SWITCH (
SELECTEDVALUE ( Parameter[Parameter Fields] ),
"'DimOrganisation'[BU]", DISTINCTCOUNT(DimOrganisation[BU]),
"'DimOrganisation'[Company]", DISTINCTCOUNT(DimOrganisation[Company]),
..........
It would be really nice if the Parameter fields could be used "directly" in a measure.
Just to be currious, have you found a better way to do it?
Regards Niels