'Divide 1st row with rest rows with multiple conditions in POWER BI

I have a table in matrix BI. I am trying to divide "AC sales" to rest of the rows. My desired result should be column CY%. I have period, qtd (quarter to date), ytd (year to date). I do have different states as well. So, every time I divide ac sales (1st row), it divides the rest of the rows based on given division and period or qtd or ytd. So, this is for state california. I have more states for example denver, colorado etc. Below is one example from California state. FYI - all this info is stored in one table. Can anyone please help me on this?

Division    CA       CA        CA      CA
Period      P09     P09       P09QTD  P09QTD
            CY      CY%        CY     CY%
Department
AC Sales    160  =160/160     200     =200/200
line 2      130  =130/160     100     =100/200
line 3      100  =100/160      50     = 50/200
line 4       90  =90/160


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source