good night!
I'm new to the MDX world and I'm having a hard time creating a calculated measure, the problem is this: I have a measure that is calculated using the final balance of the previous month as the balance of the current month. Something similar to what they see below.
This is how the data should appear The problem is that the mdx script I did not add the previous data to the display and so it ends up showing me an incorrect initial value. In the image above it should return the final balance calculated from the beginning of the company to the selected filter. Can anyone help me?
This is how it is showing up. Here is the mdx query I created:
with Member [Saldo Final 2] as ([Measures].[Certificados Novos] + [Measures].[Reativados] - [Measures].[Cancelados Menor ou Igual a 6 Parcela] - [Measures].[Cancelados Maior que a 6 Parcela]) member [Saldo Final Mês Anterior 2] as (ParallelPeriod ([DIM TEMPO].[MES ANO].[MES ANO] , 1 , [DIM TEMPO].[MES ANO].CurrentMember ), [Saldo Final 2]) member [Saldo Inicial 2] as Sum([DIM TEMPO].[MES ANO].CurrentMember.FirstSibling:[DIM TEMPO].[MES ANO].CurrentMember, [Saldo Final Mês Anterior 2]) member [Final] as [Saldo Inicial] + [Measures].[Saldo Final 2]
select [DIM TEMPO].[MES ANO].[MES ANO] on columns, {[Measures].[Certificados Novos], [Measures].[Reativados], [Measures].[Cancelados Menor ou Igual a 6 Parcela], [Measures].[Cancelados Maior que a 6 Parcela], [Final] } on rows from [dw_sinaf] where {[DIM TEMPO].[ANO].&[2016]}