cancel
Showing results for
Did you mean:
Highlighted
Helper I

## Level of Detail Calculation

How do I achieve the Desired Calculation below (assume this is the entire table)? The calculation would be a sum of [# Students] fixed to the level of [Campus].

In Tableau, the calculation would be {FIXED [Campus] : SUM( [# Students] ) }.

6 REPLIES 6
Memorable Member

## Re: Level of Detail Calculation

Create a measure:

```Fixed # = CALCULATE(
SUM(Table4[#Students]),
ALLEXCEPT(Table4, Table4[Campus])
)```

Hope this helps

David

Helper I

## Re: Level of Detail Calculation

Shoot, I oversimplified my example. So assume that [Campus] and [# Students] are in two different tables (I know that would be unecessary, but play along). The calculation you provided would not work in that case.

Memorable Member

## Re: Level of Detail Calculation

How are [Students] and [Campus] related in the model?

Helper I

## Re: Level of Detail Calculation

Let me start over. Take the single table on the left. How do I count the number of students (fixed per campus) even when the data is being split by grade level? My follow up question is how to do a unique count?

Memorable Member

## Re: Level of Detail Calculation

For the fixed #, its the same basic code, just using COUNT instead of SUM

```Fixed # = CALCULATE(
COUNT(Table4[Student ID]),
ALLEXCEPT(Table4, Table4[Campus])
)```

What do you mean by "unique count" ?

Microsoft

## Re: Level of Detail Calculation

Could you tell me if your problem has been solved? If it is,kindly mark the helpful answer as a solution and welcome to share your own solution. More people will benefit from here. If not, please share more details for us so that we could help further on it.

Regards,

Cherie

Community Support Team _ Cherie Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Announcements

#### Announcing the New Spanish Forum

Do you need help in Spanish? Check out our new Spanish community section.

#### April 2020 Community Highlights

Info on our Super Users, MBAS content and badges, and updates to our support articles. - Read the full Community Highlights.

#### MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

Top Solution Authors
Top Kudoed Authors