Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Make an average of some months sales and group them on a new "month"

Hello,

I would like for 201607 to 201612, make an average of sales and rename that "month" as segment 1.

I would like always to show the Segment1.

i have attached the same data on the qwd.

I hope you can help me.

thank you

TEST.PNG

1 Solution

Accepted Solutions
MK_QSL
MVP
MVP

Create a Variable

vDate

=Date(YearStart(Today()),'YYYYMM')

Now use below

Calculated Dimension

=Aggr(IF(Date < $(vDate),'Segment1',Date),Date)

Expression

Avg(Aggr(SUM(Sales),Date))

View solution in original post

2 Replies
MK_QSL
MVP
MVP

Create a Variable

vDate

=Date(YearStart(Today()),'YYYYMM')

Now use below

Calculated Dimension

=Aggr(IF(Date < $(vDate),'Segment1',Date),Date)

Expression

Avg(Aggr(SUM(Sales),Date))

antoniotiman
Master III
Master III

Hi Pablo,

see Attachment.

Regards,

Antonio.