Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
Hi,
I have a DAX formula that solves a an equation where I have two different columns and I am finding the difference between the previous row of one column and the current row of a different column
(EX: CUSTUM (Current Row) - IMPROVEMENT 1 (Previous Row)).
However, I am getting very stuck because when there would be a 0 value for improvement it would be replaced with the original value of Current Row. I am getting very stuck on how to create a DAX formula that If Improvement 1 value = 0 then the custum row will be the same value as the previous row.
CURRENT TABLES
Current Improvement Custom
10 100
12 90
0 78
5 100
0 95
10 100
*****I am hoping to make
Current Improvement Custom
10 100
12 90
0 78
5 78
0 73
10 73
Thank you very much for the help!! 🙂
Solved! Go to Solution.
Hi @Anonymous ,
Try this formula:
Column =
var start_custom = CALCULATE(SUM('Table'[Custom]),FILTER('Table','Table'[Index]=1))
var cumulative_CI = CALCULATE(SUM('Table'[Current Improvement]),FILTER('Table','Table'[Index]<=EARLIER('Table'[Index])-1))
return
start_custom-cumulative_CI
Best Regards,
Jay
Hi @Anonymous ,
Try this formula:
Column =
var start_custom = CALCULATE(SUM('Table'[Custom]),FILTER('Table','Table'[Index]=1))
var cumulative_CI = CALCULATE(SUM('Table'[Current Improvement]),FILTER('Table','Table'[Index]<=EARLIER('Table'[Index])-1))
return
start_custom-cumulative_CI
Best Regards,
Jay
Thank You!!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 44 | |
| 43 | |
| 38 | |
| 19 | |
| 15 |
| User | Count |
|---|---|
| 67 | |
| 66 | |
| 31 | |
| 28 | |
| 24 |