Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
sergio0592
Specialist III
Specialist III

Sum two periods

Hi all,

I have data with orders nb associated with two fields :

-period (Day / Night)

-week (Week / Week-end)

In my chart i display orders nb for Day Week (monday to friday and 08:00 to 18:00) and Night / Week-End (Saturday and sunday or night monday to friday).

It works but i have to sum Orders WE with Orders NW. And i wonder if there a way to simplify this with just one Set Analysis line?

Snapshot.jpg

Regards

1 Solution

Accepted Solutions
sunny_talwar

May be like this:

=If($(vValue_list)='Day&Week',sum({$<Period={"D"},Week={"W"}>} [Orders nb]),

Sum({$<Period={"N"}, Week={"W"}>+$<Week={"WE"}>} [Orders nb]))

View solution in original post

2 Replies
sunny_talwar

May be like this:

=If($(vValue_list)='Day&Week',sum({$<Period={"D"},Week={"W"}>} [Orders nb]),

Sum({$<Period={"N"}, Week={"W"}>+$<Week={"WE"}>} [Orders nb]))

sergio0592
Specialist III
Specialist III
Author

I made sum of Set analysis and from now thanks to you i'll make sum inside Set analysis!