Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am wanting to return a sum only when the value in the dimension is equal to a variable but it's not working as expected.
The variable (vCurrentYYYY/WW) is
=max({$<[DateIsland.Date]={'$(vToday)'}>} [DateIsland.Year]) &'/'& num(max({$<[DateIsland.Date]={'$(vToday)'}>} [DateIsland.Week]),'00')
and returns (for the current week) 2025/21
The dimension 'MPR YYYY/WW' contains data in the same format so I would expect that by using the following (where Alloc is a number) that it would only return the sum for the matching week?
Sum(${<[MPR YYYY/WW]={'$(vCurrentYYYY/WW)'}>} Alloc)
but it is returning every week
How can I get it to return just the current week total?
A set analysis is quite the same as a selection - and if the search-string doesn't fit to any field-value no selection could be applied respectively the attempt is imply ignored.
Personally I would tend to simplify the task and skipping the variables because it looked that they cause more efforts and complexity as benefits and using instead an expression like:
sum({< YearWeek = p({< Island.Date = {"$(=today())"}>} Island.YearWeek)>} Value)
Mind sharing some sample data?