Hi,
I have a data model with a fact table and a dimension table (SampleOrder). The Dimension Table looks like this:
<tbody>
</tbody>
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:
Sample | Order |
Top | 1 |
Middle | 2 |
Bottom | 3 |
Other | 4 |
<tbody>
</tbody>
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