Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i want to add date range {<Transaction_Date={">=$(VStartDate1)<=$(VEndDate1)"}>} with my dimension as sales
which i have calculated as follows
If(
GetFieldSelections([Select to See]) = 'AED',
Sum({$<TRANSACTION_DESC={'Sale / Distribution'},[Posted Date] = {">=$(vMTD_StartDate) <=$(vYTD_EndDate)"}, [Posted Year]=, [Posted Month]=>}(Lc_Amt * Rate)),
If(GetFieldSelections([Select to See]) = 'USD',
Sum({$<TRANSACTION_DESC={'Sale / Distribution'},[Posted Date] = {">=$(vMTD_StartDate) <=$(vYTD_EndDate)"}, [Posted Year]=, [Posted Month]=>}(Lc_Amt / Rate2)),
Sum({$<TRANSACTION_DESC={'Sale / Distribution'},[Posted Date] = {">=$(vMTD_StartDate) <=$(vYTD_EndDate)"}, [Posted Year]=, [Posted Month]=>}(Lc_Amt))
)
)
Hi, you can try switching posting by transacion data, depending of your model or selctions maybe you nee to keep other fields to ignore, or you can just keep only the transaction date.
Other fields like Lc_Amt, Rate... should have a relation or be in the same table as Transaction_Date
If(
GetFieldSelections([Select to See]) = 'AED',
Sum({$<TRANSACTION_DESC={'Sale / Distribution'},Transaction_Date={">=$(VStartDate1)<=$(VEndDate1)"}, [Posted Year]=, [Posted Month]=>}(Lc_Amt * Rate)),
If(GetFieldSelections([Select to See]) = 'USD',
Sum({$<TRANSACTION_DESC={'Sale / Distribution'},Transaction_Date={">=$(VStartDate1)<=$(VEndDate1)"}, [Posted Year]=, [Posted Month]=>}(Lc_Amt / Rate2)),
Sum({$<TRANSACTION_DESC={'Sale / Distribution'},Transaction_Date={">=$(VStartDate1)<=$(VEndDate1)"}, [Posted Year]=, [Posted Month]=>}(Lc_Amt))
)
)