Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
another quick question about an analysys set.
I would like to display in a table a column with the number of defects per responsible sector when the user selects the date. However, I can't display the number of defects for the month; I think that the comparison between the month selected and my year and month variable isn't working.
My month column displays the total number in the database without filtering against the month and year selected.
Count({1<[months(date)]={'7'},[annee(date)]={'2023'}>} data_id)
Do you have any ideas?
Thanks in advance.
If you'd like something to respond to date.autoCalendar.date, then you should be using that field in your set analysis. I'm not sure what months(date) or year(date) are meant to be.
With that in mind, you can search Community for this, as it has been answered many times, e.g.
https://community.qlik.com/t5/App-Development/Set-analysis-current-month-and-year/td-p/1192940
Assuming those are the actual field names, this will display the results for July 2023 while ignoring your selections. I'm not sure what part of your screen capture is meant to show this, or what the exact issue is. It also doesn't look like those are the field names for your selection, but I might be reading that part wrong.
to complete my question
sorry, the last set_analysis was wrong :
Count({1<[months(date)]={vMonth},[year(date)]={vYear}>} data_id)
I would like the column ("Qty defects month") to calculate the number of defects for the current month (=date.autoCalendar.date).
This 'date.autoCalendar.date' field corresponds to a date in the form dd.mm.yy.
If you'd like something to respond to date.autoCalendar.date, then you should be using that field in your set analysis. I'm not sure what months(date) or year(date) are meant to be.
With that in mind, you can search Community for this, as it has been answered many times, e.g.
https://community.qlik.com/t5/App-Development/Set-analysis-current-month-and-year/td-p/1192940