Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi Experts
See image below of end result, the current measure is off by one row, ie. the end result needs to shift up one. all the values are correct be in the wrong position (move up one)
Image
Measure
The measure was done by another User on the forum. But i cannot work out what to change in order to shift up one position the end result.
Measure =
var _currPeriod = max('Sample'[MonthKey])
var _last6 = topn(6, Filter(ALL('Sample'[MonthKey]), 'Sample'[MonthKey] < _currPeriod), 'Sample'[MonthKey])
var _last6Cnt = COUNTROWS(_last6)
var _numerator = CALCULATE(SUMX( 'Sample', 'Sample'[Amount] * 'Sample'[Rate]), _last6, all('Sample'))
var _denominator = CALCULATE(sum('Sample'[Amount]), _last6, all('Sample'))
return if(_last6Cnt >= 6, DIVIDE( _numerator , _denominator))
Solved! Go to Solution.
@Anonymous , is month key a date or number . I think you move back month like
var _currPeriod = max('Sample'[MonthKey]) -1
or
var _currPeriod = eomonth(max('Sample'[MonthKey]),-1)
Hi @Anonymous
What is the specific value of Month Key ? What is the exact result you need in the end ?
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , is month key a date or number . I think you move back month like
var _currPeriod = max('Sample'[MonthKey]) -1
or
var _currPeriod = eomonth(max('Sample'[MonthKey]),-1)
Hi Amit not working....
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
85 | |
65 | |
51 | |
45 |
User | Count |
---|---|
218 | |
88 | |
83 | |
65 | |
56 |