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.
Hi,
I wonder if we can manipulate cells of one colomn, to create other column. For example, in this test, I want to put the first cell equal 0 then subtract the cell i-1 and the cell i
Thank you for your cooperation and your response.
Best regards.
Solved! Go to Solution.
Hi @habibcss,
If I understand you correctly, you should be able to follow steps below to get your expected result.
I assume you have a table called "Table1" like below.
1. Add an Index Column for your table within Query Editor under Add Column tab.
2. Then you should be able to use the formula below to create a new calculate column in the table to get your expected result.
Column = VAR currentIndex = Table1[Index] VAR currentValue = Table1[Value] RETURN IF ( currentIndex = 0, 0, currentValue - CALCULATE ( MAX ( Table1[Value] ), FILTER ( ALL ( Table1 ), Table1[Index] = currentIndex - 1 ) ) )
Regards
Hi @habibcss,
If I understand you correctly, you should be able to follow steps below to get your expected result.
I assume you have a table called "Table1" like below.
1. Add an Index Column for your table within Query Editor under Add Column tab.
2. Then you should be able to use the formula below to create a new calculate column in the table to get your expected result.
Column = VAR currentIndex = Table1[Index] VAR currentValue = Table1[Value] RETURN IF ( currentIndex = 0, 0, currentValue - CALCULATE ( MAX ( Table1[Value] ), FILTER ( ALL ( Table1 ), Table1[Index] = currentIndex - 1 ) ) )
Regards
Hi @habibcss
Can you please post a mock up of what you would like the data to look like based on the picture you have posted?
It will help to clarify your requirements. 🙂
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
95 | |
77 | |
68 | |
54 |
User | Count |
---|---|
144 | |
105 | |
102 | |
89 | |
63 |