Hi,
I have a data model with a fact table and a dimension table (SampleOrder). The Dimension Table looks like this:
[TABLE="width: 250"]
<tbody>[TR]
[TD]Sample[/TD]
[TD]Order[/TD]
[/TR]
[TR]
[TD]Top[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Middle[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Bottom[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Other[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]
The Sample Column is the relationship key back to the Fact table.
I want to create a simple table that shows the cumulative % of value represented by the Samples. The measure below works fine if I put the Order column in the visual, but if I drop it out and instead put the Sample column in then it just shows the actual percentage value and not the cumulative value. I can't really understand why this is happening.
I want to do a cumulative total of [Bank Value] (a simple SUM of the [Value] column
Thanks
I have a data model with a fact table and a dimension table (SampleOrder). The Dimension Table looks like this:
[TABLE="width: 250"]
<tbody>[TR]
[TD]Sample[/TD]
[TD]Order[/TD]
[/TR]
[TR]
[TD]Top[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Middle[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD]Bottom[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD]Other[/TD]
[TD]4[/TD]
[/TR]
</tbody>[/TABLE]
The Sample Column is the relationship key back to the Fact table.
I want to create a simple table that shows the cumulative % of value represented by the Samples. The measure below works fine if I put the Order column in the visual, but if I drop it out and instead put the Sample column in then it just shows the actual percentage value and not the cumulative value. I can't really understand why this is happening.
I want to do a cumulative total of [Bank Value] (a simple SUM of the [Value] column
Code:
Bank Value Cum% (by sample) =
DIVIDE (
CALCULATE (
[Bank Value],
FILTER (
ALL ( SampleOrder[Order] ),
SampleOrder[Order] <= MAX ( SampleOrder[Order] )
)
),
CALCULATE (
[Bank Value],
ALLSELECTED()
)
)
Thanks