Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi experts
We need the last value of a dimension "Category", this one is on the last snapshot "YM", Year Month.
Any ideas how to realize it?
not yet working:
sum(
{<[YearMonth]
={"$(='>=' & Monthstart(Addmonths(Max(YearMonth),-11)) & '<=' & MonthEnd(Max(YearMonth)))"},
[Event Reason]={"$(Chr(39) & =firstsortedvalue ([Event Reason], -[YearMonth], 1) & Chr(39))"}>}
Joiner)
@TomBond77 When you say not working, What is done the debugging? What we should do this case.
- Add another column with below expression and are you getting any data?
sum(
{<[YearMonth]
={"$(='>=' & Monthstart(Addmonths(Max(YearMonth),-11)) & '<=' & MonthEnd(Max(YearMonth)))"}>}
Joiner)
- Try to add this alone and check? what is the output for that?
$(Chr(39) & =firstsortedvalue ([Event Reason], -[YearMonth], 1) & Chr(39))
- Then use the same expression in Label and show us the result for validation.
sum(
{<[YearMonth]
={"$(='>=' & Monthstart(Addmonths(Max(YearMonth),-11)) & '<=' & MonthEnd(Max(YearMonth)))"},
[Event Reason]={"$(Chr(39) & =firstsortedvalue ([Event Reason], -[YearMonth], 1) & Chr(39))"}>}
Joiner)
Thanks
This is the result. This expression at the right column seems not to work.
@TomBond77 Can i know what is not working here? If you can see the condition how the value produced and it is same for last column, Or, did i miss anything in between?
Thanks all
I think I need to resolve this issue in the loading script.
The following script is not working. The field "Event Reason_new" is never filled up:
if(date(Timestamp, 'YYYY-MMM')= date(Addmonths(MonthEnd(Today()),-1), 'YYYY-MMM'), [Event Reason]) as [Event Reason_new]
Why is the new field [Event Reason_new] is not filled up?
Thanks for your help!