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
gsulaimon
Frequent Visitor

divide in row

i want to divide this by each other to give the % but i have been finding it difficulti want to divide this by each other to give the % but i have been finding it difficult

i want to divide this by each other to give the % but i have been finding it difficulti want to divide this by each other to give the % but i have been finding it difficult

1 ACCEPTED SOLUTION

@gsulaimon ,

 

In query editor, create an index from 1, then create a calculate column using dax below:

Result = 
VAR Current_Index = 'Table'[Index]
VAR Current_Value = 'Table'[value]
RETURN
IF(MOD(Current_Index, 2) <> 0,  Current_Value / CALCULATE(MAX('Table'[value]), FILTER('Table', 'Table'[Index] = Current_Index + 1)))

Capture.PNG 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-yuta-msft
Community Support
Community Support

@gsulaimon ,

 

Could you please share the sample data and give the expected result?

 

Regards,

Jimmy Tao

VijayP
Super User
Super User

Can you please rephrase your question. Its not clear




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


@v-yuta-msft @VijayP 

 

KPIs       value

 

ABC        18

 

ade       18

 

wade    27

 

def      27 

 

 

I want to divide the row's value by each other 

 i.e wade/def 

       ABC/ade

I need a DAX expression what would help achieve this

 

 

       

@gsulaimon ,

 

In query editor, create an index from 1, then create a calculate column using dax below:

Result = 
VAR Current_Index = 'Table'[Index]
VAR Current_Value = 'Table'[value]
RETURN
IF(MOD(Current_Index, 2) <> 0,  Current_Value / CALCULATE(MAX('Table'[value]), FILTER('Table', 'Table'[Index] = Current_Index + 1)))

Capture.PNG 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.