Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
priya945
Creator
Creator

Please help with expression

Capture.JPG

Hi All,

How to get the row-wise total in above table

Ex: for first row 12:00 - 2:59 am , total row value 188(Weekday)+450(weekend) = 638.

thanks in advance

 

 

1 Solution

Accepted Solutions
jensmunnichs
Creator III
Creator III

Add another expression:

Column(1) + Column(2)

Note that you might have to adjust the 1 or 2 based on how many measures you have and where they are located, this is just based on the table in the image you posted.

More info on Column function

Some other ways to solve this problem in this thread

View solution in original post

16 Replies
jensmunnichs
Creator III
Creator III

Add another expression:

Column(1) + Column(2)

Note that you might have to adjust the 1 or 2 based on how many measures you have and where they are located, this is just based on the table in the image you posted.

More info on Column function

Some other ways to solve this problem in this thread

priya945
Creator
Creator
Author

Hi,

Thank you for your suggestion.

Could you please help me how to find the  same in Bar chart

 

jensmunnichs
Creator III
Creator III

I'm pretty sure you can do the same thing in a bar chart. Another option would be to label the expressions you use to find Weekday and Weekend, then use those names in the third expression (in this case simply Weekday + Weekend)
priya945
Creator
Creator
Author

Agreed that if I am using 3 expressions I am able to plot bar chart but if the requirement is to show only  (Weekday + Weekend) expression as below then this is change

Capture.JPG

jensmunnichs
Creator III
Creator III

I think the only way to hide expressions in a bar chart is by ticking the 'invisible' checkbox in the expression tab and hiding the label in the axis tab, but this will still leave empty spaces where the bars would be. So I think the only way to solve this would be to use the expressions you used to get to Weekdays and Weekend:

(WeekdayExpression) + (WeekendExpression)

If your expressions are very long, you could always store them in a variable and make it:

($(vWeekdayExpression)) + ($(vWeekendExpression))

priya945
Creator
Creator
Author

Thank you so much.

Could you please guide me if I can achieve the same i.e Weekday + Weekend value in the script

jensmunnichs
Creator III
Creator III

What expressions do you use to calculate Weekday and Weekend?

Also can you please provide a sample of your data and possibly your application, that would really speed things up.
priya945
Creator
Creator
Author

Thanks for your time. I have achieved the requirement in script using below but looking for any optimized(better) than below. This way I have to load the same table several times based on number of filed to concatenate into one(New)

Exercise:
LOAD [Time of Day],
Weekday,
Weekday as New

FROM [....\Book1.xlsx]
Concatenate
LOAD [Time of Day],
Weekend as New,
Weekend
FROM [....\Book1.xlsx]

jensmunnichs
Creator III
Creator III

Still would help a lot if you could provide your application and/or a sample of your data as I'm a bit confused about your requirement.