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.
Hello!
Below is my sample dataset. I would like to create the 'Calculation' column which subtracts the subsequent values for each ID.
ID | Index | Value | Calculation |
A | 1 | 100 | 100-0 = 100 |
B | 1 | 250 | 250-0 = 250 |
A | 2 | 300 | 300-100 = 200 |
B | 2 | 600 | 600-250 = 350 |
A | 3 | 350 | 350-300=50 |
Thanks in advance,
P.S new to DAX and Power BI
Solved! Go to Solution.
Hi @Zabeer
Try this for your calc column:
New Col =
VAR previous_ =Table6[Index]-1
RETURN
Table6[Value]- CALCULATE(DISTINCT(Table6[Value]), Table6[Index]=previous_,ALLEXCEPT(Table6, Table6[ID]))
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
Hi @Zabeer
Try this for your calc column:
New Col =
VAR previous_ =Table6[Index]-1
RETURN
Table6[Value]- CALCULATE(DISTINCT(Table6[Value]), Table6[Index]=previous_,ALLEXCEPT(Table6, Table6[ID]))
Please mark the question solved when done and consider giving kudos if posts are helpful.
Contact me privately for support with any larger-scale BI needs, tutoring, etc.
Cheers
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 |