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: 
kkkumar82
Specialist III
Specialist III

Need to add sales in weekend and show them as it is in WeekDays

Hi Friends,

I have a requirement where I need to show WeekDays sales individually and for the WeekEnd I would like to show the sum of that week

as 'Total Week.

Attaching a sample and qvw .

2 Replies
kkkumar82
Specialist III
Specialist III
Author

stalwar1‌ can you have a look

sunny_talwar

Check the attached

Capture.PNG

Dimension

Name

=If(Match(WeekDay, 'Sat', 'Sun'), Dual('Total Week', WeekEnd), Date(Date))

Expression

If(SubStringCount(Concat(WeekDay, ','), 'Sat') > 0 or SubStringCount(Concat(WeekDay, ','), 'Sun') > 0, Aggr(NODISTINCT Sum(Sale), Name, WeekEnd), Sum(Sale))

Where WeekEnd if created in the script like this

LOAD Name,

    Date,

    Sale,

    WeekDay(Date) as WeekDay,

Date(Floor(WeekEnd(Date, 0, 0))) as WeekEnd

FROM

[Praveen.xlsx]

(ooxml, embedded labels, table is Sheet1);