Forum Discussion
Excel like calculations using DAX.
I need to create a measure that will have the adjacent cell calculation as the numerator that will be divided by a fixed denominator
i.e.
my B2 cell will have the formula -> C2 / column1 (where B2 will be the calculated ratio using the same formula)
C2 cell will have the formula -> D2 / column1 , D2 cell will have the formula -> E2 / column1 , (where C2 & D2 will be the calculated ratios)
similary Y2 cell will have the formula -> Z2 / column1
Any way this can be achieved using DAX? Sample given below with calculations for clarity.
| Column1 | 2 | 3 | 4 | 5 |
| Result | 3 | 6 | 18 | 72 |
4 Replies
- Greg_DecklerCommunity Champion
hdavidson - Are you saying your data is like this:
Column1
2
3
4
5
Or like this:
Column1, Column2, Column3, Column4, Column5
And where does the 72 come from? Sorry, none of this is making any sense to me. Maybe this will help: https://community.powerbi.com/t5/Community-Blog/Excel-to-DAX-Translation/ba-p/1060991
- hdavidsonHelper I
Greg_Deckler , my data is in the form :
Column1, column2, column3 and so i.e horizontal.
Also 72 is the result from the next calculation
- hdavidsonHelper I
Greg_Deckler , the value 72 comes from the next calcution i.e. the adjacent cell value i.e. 360 / 5 = 72.
so for my last cell in column1 the calculcation will be 0 i.e. 0 / last cell value in column1.
Given an example as below. hope this makes things clear.
Column1 2 3 4 5 6 last cell value Result 3 6 18 72 360 0 (as no value in adjacent cell)