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 have a table with multiple columns but i want to performa calculation on 2 columns. here is the sample data.
I want to find the last non zero value in column A and then get the sum of all the values in column B starting from Last non-zero value of column A till all the rows with 0 values in column A. In short, calculation needs to be performed on highlighted area only.
Please let me know how can i do that. Appreciate any help.
Thanks in Advance
Solved! Go to Solution.
@tahira_ali_28
Please create the measures as follows:
A_S Last =
VAR _LastIndex = CALCULATE( MAX ( Table1[Index] ) , Table1[A_S] <> 0 )
RETURN
CALCULATE(
SUM(Table1[D]),
Table1[Index] > _LastIndex
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@tahira_ali_28
Please create the measures as follows:
A_S Last =
VAR _LastIndex = CALCULATE( MAX ( Table1[Index] ) , Table1[A_S] <> 0 )
RETURN
CALCULATE(
SUM(Table1[D]),
Table1[Index] > _LastIndex
)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
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 |
---|---|
114 | |
99 | |
83 | |
70 | |
60 |
User | Count |
---|---|
150 | |
115 | |
104 | |
89 | |
65 |