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
EveryUser
New Member

Creating Tables

Hello, I'm currently working on a project where I have to create/modify a table that I have to put down values where I have to substract using 2 values located in the same column. However I'm currently having difficulties on doing so is there a sollution/assistance for this problem? (Note: The table contains 22 rows in which row 1 and row 12 needs to be substracted, same applies for row 2 and 13, 3 and 14...)

 

Thank you so much for your time

7 REPLIES 7
v-rongtiep-msft
Community Support
Community Support

Hi @EveryUser ,

I have created a simple samplem please refer to my pbix file to see if it helps you.

Create a measure.

Measure = var _value=CALCULATE(MAX('table'[Column 1 ]),FILTER(ALL('table'),'table'[Index]=SELECTEDVALUE('table'[Index])+4))
return 
MAX('table'[Column 1 ])-_value

vpollymsft_0-1676360181082.png

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Polly

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

EveryUser
New Member

 

For example in this table a column needs to generated by substracting sample 1 in column 1 and sample 5 in column 1 which also applies for 2-6, 3-7 and 4-8. And another column needs to be generated with the same application but on column 2. 

 

   
 Column 1 Column 2
Sample 153
Sample 221
Sample 313
Sample 404
Sample 548
Sample 625
Sample 712
Sample 87

1

hi @EveryUser 

 

could you also paste the expected result column? for instance, where do you plan to put the subtraction result of sample 1 and 5?

The result will be 

 Column 1Column 2
Difference Between 1 and 51-5
Difference Between 2 and 60-4
Difference Between 3 and 702
Difference Between 4 and 8-73

Values for column 1 are 1,0,0,-7

For some reason the values on the first column are so closely together with sample titles but the values for the first column are 5,2,1,0,4,2,1,7 respectively

FreemanZ
Super User
Super User

hi @EveryUser 

 

Seems doable. could you paste some sample data?

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.