Slice a measure based on only one attribute in SSAS Tabular

100 views Asked by At

I am trying to create a measure which should slice the value based on only one dimension in SSAS tabular.

e.g the cube has a measure Population. and it has dimensions Country and time the data is something like:

Crty_A : 2018 :100
Crty_A : 2017 :200
Crty_B : 2018: 50
Crty_C : 2018: 25

The data in the measure should get aggreted only at country level. like when only country name is selected the data should be like:

Crty_A :300
Crty_B : 50
Crty_B : 25

But if time and the measure is selected the data should be:

2018 :100
2017 :200
2018: 50
2018: 25

is there any way this can be achieved?

1

There are 1 answers

0
z33Will On

You should be able to add simple SUM into your formula that sums the entire column. Save that as your measure and then when you bring the measure into the downstream application (Excel, PowerPivot, PowerBI, ETC) the slicing should already be applied to that measure based on the filters being applied. I'm assuming that you have a star schema and all the tables appropriate relationships.

Measure_Name:=SUM(TableName[Population])