Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
sarafamiglietti
Creator
Creator

Set Analysis troubleshooting

Hello,

I want to calculate sales when date equals max date of the selected period.

Can someone helps me?

For example :

For week 2017/44, I want to display sum of the max date of this week, so the sales of the 05/11/2017 (and not the sales of the complete week).

Capture-SetAnalysis.JPG

Thanks and regards

1 Solution

Accepted Solutions
sunny_talwar

Or this

FirstSortedValue(Aggr(Sum(nb_transaction), dt_jour), -dt_jour)

View solution in original post

13 Replies
sunny_talwar

Try this

Sum({$ <dt_jour={"$(=Date(max(dt_jour)))"}>} nb_transaction)

sunny_talwar

Or this

FirstSortedValue(Aggr(Sum(nb_transaction), dt_jour), -dt_jour)

sarafamiglietti
Creator
Creator
Author

Hello,

Formula with FirstSortedValue is working!

Tanks a lot!

sarafamiglietti
Creator
Creator
Author

Hello,

I bounce on my previous question : what would be the formula if I add a cyclic group as dimension?

Thanks and regards

Sara

sunny_talwar

Would need to see what dimensions you have and what is the output you expect

pradosh_thakur
Master II
Master II

try


getcurrentfield('Cyclicgroupname') if you add cyclic group as dimesnion

Learning never stops.
sarafamiglietti
Creator
Creator
Author

Hello,

I had an example on my previous answer.

There are 2 formulas: when I use dimensions in a cyclic group and when I don't use a cyclic group.

Don't hesitate if you need more precision.

Thanks & Regards

sunny_talwar

May be this

Sum({$<dt_jour = {"$(=max(dt_jour))"}>} nb_transaction)

sarafamiglietti
Creator
Creator
Author

It works fine! Thanks a lot.

Just to understand :

Why my formula did not work? -> Sum({$ <dt_jour={'=max(dt_jour)'}>} nb_transaction)

In the Set analysis, what is the difference between {'=max(dt_jour)'} and {"$(=max(dt_jour))"}?

Thanks and regards