Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How can I merge the following two expressions into one? Thanks you!
sum({<T3.DateC= {">=$(=AddMonths(Max(T3.DateC), -11))"}>})
Count({<[T3.Amount]={">=$(V1)<=$(V2)"}>}distinct[T3.VendorID])
Its not very clear what you are trying to do. The Sum() expression you posted is incomplete. Do you want to merge the set expressions, get a count of the sums, a sum of the counts, or something else?
I want to count the number of vendorids that meet the conditions.
Such as these 2 conditions, 1. Recent 1 year. 2. The Amount > = $(V1) < = $(V2)
But I don't know how to write them together. I tried using "and" but it didn't work.
sum({<T3.DateC= {">=$(=AddMonths(Max(T3.DateC), -11))"}>}[T3.Amount])
Count({<[T3.Amount]={">=$(V1)<=$(V2)"}>}distinct[T3.VendorID])
Om Det you dont use END to separate different criteria, but comma (,).
Try this
Count({<
[T3.Amount]={">=$(V1)<=$(V2)"},
T3.DateC= {">=$(=AddMonths(Max(T3.DateC), -11))"}
>}distinct[T3.VendorID])
I want to count the data after SUM because there are many Amount records.
Can you add "SUM" to it? Or use other methods to sum "Amount" before judging ">=$(V1)<=$(V2)". Thank you!