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: 
george55
Partner - Creator III
Partner - Creator III

Different results with and without a Variable

Hi all,

Have two questions.

1. When putting a formula in a variable and use the variable in the app (e.g. in a chart) and on the other hand use the same formula directly in the app, the results is different. Don't understand why.

The correct numbers are like this below (putting the formular directly in the chart-app):
2019.1215-114552.jpg

When going with the variable, all numbers are the same:
2019.1215-114641.jpg

This is the formular:

1-(
(
Sum(Aggr(Count(Distinct {<[X_CAL.Calldirection]={'Inbound'}>} [%CallId]), [X_EVE.HuntGroup], [X_CAL.TimeStamp.Calendar.Year], [X_CAL.TimeStamp.Calendar.Quartal], [X_CAL.TimeStamp.Calendar.Month], [X_CAL.TimeStamp.Calendar.Week], [X_CAL.TimeStamp.Calendar.Day]))
-
Sum(Aggr(Count(Distinct {<[X_CAL.Calldirection]={'Inbound'}, [X_EVE.EventType]={'TALKING'}>} [%CallId]), [X_EVE.HuntGroup], [X_CAL.TimeStamp.Calendar.Year], [X_CAL.TimeStamp.Calendar.Quartal], [X_CAL.TimeStamp.Calendar.Month], [X_CAL.TimeStamp.Calendar.Week], [X_CAL.TimeStamp.Calendar.Day]))
-
Sum(Aggr(Count(Distinct {<[X_CAL.Calldirection]={'Inbound'}, [X_EVE.EventType]={'28'}>} [%CallId]), [X_EVE.HuntGroup], [X_CAL.TimeStamp.Calendar.Year], [X_CAL.TimeStamp.Calendar.Quartal], [X_CAL.TimeStamp.Calendar.Month], [X_CAL.TimeStamp.Calendar.Week], [X_CAL.TimeStamp.Calendar.Day]))
)
/
Sum(Aggr(Count(Distinct {<[X_CAL.Calldirection]={'Inbound'}>} [%CallId]), [X_EVE.HuntGroup], [X_CAL.TimeStamp.Calendar.Year], [X_CAL.TimeStamp.Calendar.Quartal], [X_CAL.TimeStamp.Calendar.Month], [X_CAL.TimeStamp.Calendar.Week], [X_CAL.TimeStamp.Calendar.Day]))
)

 

2. and my second question:

is there a way to shorten all the time-dimensions?
[X_CAL.TimeStamp.Calendar.Year], [X_CAL.TimeStamp.Calendar.Quartal], [X_CAL.TimeStamp.Calendar.Month], [X_CAL.TimeStamp.Calendar.Week], [X_CAL.TimeStamp.Calendar.Day]

Have a period master-item, but don't know if it is possible to use it within a expression. so maybe I can avoid writing all the time dimensions many times.

thank you for your inputs and help.

Labels (1)
10 Replies
george55
Partner - Creator III
Partner - Creator III
Author

Great Rob!

This was exactly what I was looking for. Thank you.

George