Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello community,
I run in a problem and i am not sure if this is even possible in QLike Sense.
I would like to get all broken PCs which had a defect in a period of time. And save that data in a variable to use it later in other expressions or if it is possible select only this data (simular when you would select them by hand but with an expression).
This is what i got so far:
=if(GetSelectedCount([PCSystem]) > 0,
if( Date#([OutOfOrderDate] , 'YYYY-MM-DD') < Date#(AddMonths(SelectedDate, 1 , 1), 'YYYY-MM-DD')
AND
Date#([OutOfOrderDate] , 'YYYY-MM-DD') > Date#(AddMonths(SelectedDate, -1 , 1), 'YYYY-MM-DD'),
>-- Here save Dates which are in the timespan or use an expression to set the selection --< , 'No Data'
),
'Too many Data')
If i did not described it so it is easy understandable please ask me which part is unclear so that i can solve that misunderstanding.
I am very thankfull for every good answer.
I don't believe it's possible as you need to initiate an action to modify a state
What you can do, you can define a variable that provides a set expression that you can then use in your measure; something like the below
=if(GetSelectedCount([PCSystem]) > 0, '{<OutOfOrderDate = {"<=$(AddMonths(SelectedDate, 1 , 1)>=$(AddMonths(SelectedDate, -1 , 1)"}>}','')
This is just to give you an idea as it looks like you also have some formatting challenges
If you post your qvf it will be easier to help you
Thank you for your answer. Sorry that i replay such late but i was on vacation ^^. I will try to use your sugesstion maybe i can get with it closer to the goal.
I try to create an example App which i can post here (because there are some sensetive data in the current app).