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 am new to power Bi and I have seen a couple of solutions to this but have been unable to incorporate this in my solution.
Attached table has a desired value I want to achieve using measures or any any other way in Power BI
Date | Category | Value | Desired value |
10-03-13 | CAT-A | 9456 | no value before this date so the value should remain as 9456 |
16-03-13 | CAT-B | 15238 | no value before this date so value remains the same 15238 |
03-04-13 | CAT-A | 12657 | = 12657-9456 |
29-01-14 | CAT-C | 3452 | =3452 |
30-03-14 | CAT-A | 14324 | =14324 - last CAT-A value |
01-09-15 | CAT-B | 18234 | =18234 -15238 |
04-02-15 | CAT-C | 15234 | =15234-3452 |
15-10-15 | CAT-D | 4561 | =4561 |
Hope this makes sense!
Thanks
Solved! Go to Solution.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Great solution! Worked very well on my dataset aswell. Is there a way to create a similar solution in the Power Query Editor? It seems that due to large amount of data i keep getting errors.
Much appreciated - thanks!
Excellent ! exactly what i needed. Thank you.
@v2 See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/3395....
The basic pattern is:
Column =
VAR __Current = [Value]
VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] < EARLIER('Table'[Date])),[Date])
VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])
RETURN
__Current - __Previous
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 | |
80 | |
68 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |