Forum Discussion

ilovasen's avatar
ilovasen
Frequent Visitor
9 months ago
Solved

Previous Row Cell multiplied with This Row Cell

This is my first post in this Community. I have been struggling for a week on what is a basic calculation in Excel, but in PowerBI/DAX a different animal. I am trying to... 1. reference the previo...
  • MFelix's avatar
    MFelix
    9 months ago

    Hi ilovasen ,

     

    Try the following code:

    DFPrev4 = 
    VAR CurrentYear = 'Table'[Year]
    VAR Restart = 'Table'[EAver] - 'Table'[Year]
    VAR TableFIlter = FILTER(ALL('Table'), 'Table'[EAver] - 'Table'[Year] = Restart && 'Table'[Year] <= CurrentYear)
    RETURN
    PRODUCTX(TableFIlter , 'Table'[DFUnsec]
    )

    Has you can see the values are restarting at every 1996:

    I just did a couple of lines for each but it works properly.

     

    Basically what I'm doing is to chek the value for the dataset in this case 110000, 120000, 130000 and just filtered out the ones that start with that value.

     

    In concern to the acceped questions you can accept has many has you want.