Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I created a measure that works fine for each individual row, but the total sum and total average by division are wrong. Therefor I need to convert the measure into the column. Therefore I need to change the measure into column.
The new calculated column needs to look up current value, if the current value is blank, it needs to find the previous value and add it into the row value. So basically something like this:
Looks at current salary amount, if current salary > 0 then use current salary amount, if current salary = empty or zero, find previous salary based on date and use this alternative amount. I managed to get this to work as a measure in DAX but I need this to be converted into a column:
The dax measure is following:
Solved! Go to Solution.
@key_to , Previous salary as new column
new COlumn =
var _max = maxx(filter( 'PBI Compensation', 'PBI Compensation'[Date] < earlier( 'PBI Compensation'[Date] )), 'PBI Compensation'[Date] )
return
Sumx(filter( 'PBI Compensation', 'PBI Compensation'[Date] = _max ), 'PBI Compensation'[Amount] )
Power BI DAX- Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8
https://www.youtube.com/watch?v=cN8AO3_vmlY&t=17820s
@amitchandak Thanks a million for looking into my issue! I tried your solution but unfortunately " Earlier" does not seem to work in my context: I get the following error:
Not sure why but maybe the reason is that the reffered date column is not a continous date table (it only contains the last day of each month)?
User | Count |
---|---|
91 | |
73 | |
68 | |
63 | |
55 |
User | Count |
---|---|
98 | |
89 | |
73 | |
63 | |
61 |