Forum Discussion

superjam's avatar
superjam
Helper II
2 years ago
Solved

YTD for calculated values not working

Hello PowerBI experts!   I have 3 tables: 1. Balances Investment balances for each month, like so: Date  Final Balance  31-12-22            100.000 31-01-23            101.000 28-...
  • Greg_Deckler's avatar
    Greg_Deckler
    2 years ago

    superjam Here you go:

    Measure = 
        VAR __MesAnoNUm = MAX('Calendar'[MesAñoNum])
        VAR __Table = FILTER ( SUMMARIZE( ALLSELECTED('Calendar'), [MesAño], [MesAñoNum], "__Value", [Revenue month] ), [MesAñoNum] <= __MesAnoNum )
        VAR __Result = SUMX( __Table, [__Value] )
    RETURN
        __Result