Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to show the first 7 days from a date dimension. Its working with set expression, but upon making selections and other filters, it doesnt show any data. How can I do this dynamically to show the first 7 days based upon any selection?
What is the expression that you are using?
A common mistake when making date interval manipulations in SET analysis is that selection in other calendar fields affects your selection.
Assuming that your 7 date set calculate values for Jan 1-7 2020.
Eg: Sum({< DateField = {"<=$(=Min({1}DateField)+6)"} >} Amount)
If your users makes an selection of month February you will basically be calculating Jan 1-7 in February which is an invalid combination and your expression will return no values.
To avoid canceling your date modifier you can ignore the selection of any calendar field in your set.
Eg: sum({< Year=, Month=, Week=, DateField = {"<=$(=Min({1}DateField)+6)"} >} Amount)
Hi Vegar,
Thank you for the suggestion. However, the expression returns no values when any other selection is made as well that is not applicable with the said date range. The behaviour should be such that whenever user makes any selection, the expression should evaluate to display the first 7 days based on that selection. How can this be achieved in QlikSense? QlikView has a property to show first "n"values in dimension which changes based on user selection.
However, there is no direct way to achieve that in QlikSense. Please suggest.
Try removing the '{1}' from the expressions suggested above by Vegar. If that doesn't help, try to share a sample app and explain your expected output with scenarios in that context.
The requirement is to show the dates as a dimension in the chart and the corresponding values. This dolution would only limit the measure value.
Any suggestion on being able to show the first 7 dates and its corresponding value. Struggling a lot to find a good way
Hi Shephali,
I would say this ("This solution would only limit the measure value'') is a wrong perception. Limit set by set analysis on field values in expression actually limits the values in dimension as well, unless there is a contra-limit somewhere in other expression in the same chart.
You can probably reduce your struggle to find a good way, by creating a sample app with business case and share here asking for expected output in that context. It becomes easier and faster for people here to help you with that.