Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis syntax

hi i have attempted the folllowing two statements without success;

if([Year Week] = weekyear(today()) & num(Week(today()),00),

sum({<%ArtKat = {93}>}OrderRad.NettoBelopp))

sum({<%ArtKat = {93},[Year Week] = {weekyear(today()) & num(Week(today()),00) }>}OrderRad.NettoBelopp)

any suggestions would be greatly appreciated.

Best

Brad

Message was edited by: Bradley Coyne

1 Solution

Accepted Solutions
Not applicable
Author

At last

=sum({<%ArtKat = {93}

,[Year Week] = {"=[Year Week]=weekyear(today()) & num(Week(today()),'00')"}>}OrderRad.NettoBelopp)

It seems the dual nature of some fields linked to dates forces to put them inside the expression.

View solution in original post

9 Replies
Not applicable
Author

Hi,

You need simple quotes around your Num format: '00'

With this you second statement could work...

Is [Year Week] a number or a string?

Not applicable
Author

string

Not applicable
Author

hello thank you for your reply, i have attempted this however no success, still shows error, with a missing bracket...

Not applicable
Author

OK. Then you can try with the quotes:

sum({<%ArtKat = {93},[Year Week] = {weekyear(today()) & num(Week(today()),'00') }>}OrderRad.NettoBelopp)

If it doesn't work, you can try:

sum({<%ArtKat = {93}>} if([Year Week]=weekyear(today()) & num(Week(today()),'00'), OrderRad.NettoBelopp))

If it still doesn't work, could you please post some sample data so we can check the data model?

santharubban
Creator III
Creator III

Hi

Try this

sum({<%ArtKat = {93},[Year Week] = {"=$(weekyear(today()) & num(Week(today()),'00'))" }>}OrderRad.NettoBelopp)

or

sum({<%ArtKat = {93},[Year Week] = {'=$(weekyear(today()) & num(Week(today()),'00'))'}>}OrderRad.NettoBelopp)

Not applicable
Author

thank you for your reply.

i have posted the example now.

your suggestions have still not worked, perhaps you could take a look at the application?

best

brad

santharubban
Creator III
Creator III

try

sum({<%ArtKat = {93},[Year Week] = {'=$(Variable1)'}>}OrderRad.NettoBelopp)

Variable1 =weekyear(today()) & num(Week(today()),'00')

Not applicable
Author

hello!

thank you for your help!

it seems to ignore the week number, taking the total of all the weeks.

so we should land on 13757, however we land on 45989 in the last Key figure Shipping. so still not working to 100%

Best

Brad

Not applicable
Author

At last

=sum({<%ArtKat = {93}

,[Year Week] = {"=[Year Week]=weekyear(today()) & num(Week(today()),'00')"}>}OrderRad.NettoBelopp)

It seems the dual nature of some fields linked to dates forces to put them inside the expression.