Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can we select the row in one click in qlik sense. whenever a user clicks on any row value in the table, the corresponding field values will be stored in the variable. and will use this variables as filter for another graph. (I know I can achieve this using set analysis.) but how can i store field values of selected row. if i click any dimension value, it selects only this individual value and ,measure values are not selectable in table.
another thing is I have to show all date values after the selected date.
Can we achieve this in Qlik Sense, any Suggestion please reply.
Thanks,
Use Below
Set Variable = getfieldselections(FieldName);
And Use $(Variable) to evaluate value
Hi @VaishnaviMogal2,
1- Create a variable in the script:
Set vSelectedValues = GetFieldSelections(YourFieldName);
Set vMaxSelectedDate = Date(Max(DateField));
2- Use the variable in the set analysis of another chart to filter based on the selected values. For example:
Sum({<YourField={$(vSelectedValues)}>} Sales)
3- Use set analysis with a variable that captures the maximum selected date.
=If(DateField > vMaxSelectedDate, Count(Measure))
And you can set the vMaxSelectedDate variable using a trigger when the selection changes:
The chart will show all values after the selected date. Remember to replace DateField and Measure with your actual field names.
*** When applicable please mark the correct/appropriate replies as "solution". Please LIKE threads if the provided solution is helpful to. ***
@TauseefKhan @SunilChauhan Thanks for reply. but this is not meeting my requirements. please refer to image
suppose if I click on charge session 1 then that row's corresponding vin,start date and end date should be stored in respective 3 variables i.e., Vvin,VstartDate and VendDate. is this possible in Qlik sense?.
Thanks in advance.
Vaishnavi,
use your actual field name of vvin, Startdate and End Date in below expression Respectively.
Set Vvin={'$(=ONLY({<[Change Session]= {"$(=GetFieldSelections([Change Session]))"}>} VinHeader))'}
Set VstartDate ={'$(=ONLY({<[Change Session]= {"$(=GetFieldSelections([Change Session]))"}>} Expected Start Time))'}
Set VEndDate ={'$(=ONLY({<[Change Session]= {"$(=GetFieldSelections([Change Session]))"}>} Expected EndTime))'}
HI @SunilChauhan , Thanks!
Now I am getting the values in variables. but it's not working when I'm using these variables to filter another graph. I am using below expression to get data between start date and end date but this expr giving -
if(DateTime >= $(VStartDate) and DateTime <= $(VEndDate),DateTime)
Please correct me if I'm wrong in expr.
May be it will work in SIngle quote , try some other options
if(DateTime >= '$(VStartDate)' and DateTime <= '$(VEndDate)',DateTime)
or
try without $ sign
if(DateTime >=VStartDateand DateTime <=VEndDate,DateTime)
It sounds like an unsuitable approach because the aim should be to associate everything needed within the data-model and then the user just selects the wanted views and values. Of course, many things are possible within the UI but usually it's a detour and much harder and with disadvantages in regard to the performance and usability.