Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
hdavidson
Helper I
Helper I

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.

 

Column12345
Result361872
4 REPLIES 4
Greg_Deckler
Super User
Super User

@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


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

@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

@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.

 

Column123456  last cell value
Result361872360  0 (as no value in adjacent cell)

@hdavidson So what does your actual source data look like? There are numbers other than the result that you want somewhere, right?


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.