Qlikview how to get all excluded values on qlikview - qlikview

I have two columns on Qlikview table: date and full name.
All people work on some dates.
If I choose a date, it shows me a list of people who work on that date.
I need to make a table of all the people that do not work on that date.
I have tried to make a page trigger to select unchecked but it doesn't help me.

Select the date you want -> Right click on the date's list box and do 'select excluded'

Try to use element function E() which represent the excluded set.
sum({$<Dim1 = E({$})>} Expression1)
In your case Dim1 would be the Date dimension.
//Micke

Click on the date you want.
Right click on it.
Select Excluded.

Related

Trouble with an Access Query searching within a date range

I have a query that searches saved records and creates a report based on the record(s). Some of the fields are searchable either independently or in association with other parts of the saved record (e.g., one could search the ID, location, and/or whether or not police were notified). However, I run into problems when searching by date.
I have fields for the user to input Start Date and End Date of their desired date range. When ONE or NEITHER field are filled, the search pulls up all records AFTER the Start Date, BEFORE the end date, or ALL the records. When BOTH fields are filled, the search pulls up a record where all fields are blank (which does not exist in the table).
Each searchable field uses the same criteria in the Query:
Like Nz([field that you're searching],"*")
But the date range uses a modified version (sorry if it's SUPER clunky):
Like Nz(([Data_Input_Table].[Day_Current])>=[Forms]![Search_Form]![Start_Date_Lookup_text] And ([Data_Input_Table].[Day_Current])<=[Forms]![Search_Form]![End_Date_Lookup_text],"*")
Ideally, I'd like the user to search by NEITHER, ONE, or BOTH Start Date and End Date.
Please help!
You can't use Like on dates. Try this:
[Data_Input_Table].[Day_Current] >= Nz([Forms]![Search_Form]![Start_Date_Lookup_text], [Data_Input_Table].[Day_Current]) And [Data_Input_Table].[Day_Current] <= Nz([Forms]![Search_Form]![End_Date_Lookup_text], [Data_Input_Table].[Day_Current])

How to select a date from calendar in selenium webdriver

I am trying to automate price line website and trying to select the date range. But unable to do it.
There are two way i can think of to select date from calendar.
First way and easy way:
If date field is a textbox or if you can set the date using selenium sendKeys , you can go for sendkeys itself to select the date. Just make sure the format of input.
Second way:
You have the build the logic to select the date, i can suggest one way to select date here,
First format the input date(your input) as day , month and year.
Select the year first(it's depends on the application like selecting from dropdown or click left and right arrow , etc...).
Go for the month next and then day.
you can still put some condition while selecting the date for example, checking date is not disable before selecting it.

Include missing dates as "0" in SELECT ... A,count(A) group BY (Google Sheets, or SQL)

I am creating a histogram of dates using SQL and I want to have "0" values for the missing dates. The specific SQL system I'm using is Google Sheets. Here is my example:
What I really want is for it to look like this:
Is there any way to do this?
The query that I'm using is SELECT a,COUNT(a) GROUP BY a ORDER BY a.
Is there a way to do what I want?
Create a column of the dates you want. For instance, you can put in the first date, the right below it have a formula that adds one day, and copy the formula down.
Then, use COUNTIF or a similar function to get the counts you want, e.g.:
=COUNTIF($A$1:$A:$5,"=" & C2)

Microstrategy: With a drop down box Year, how to show values of the selected Year and Previous year in a grid

With a drop down selector 'Year' attribute (All is disabled), how to target a grid report to show values of the selected Year and Previous year?
For example:
User selects year '2012' from the drop down,
the grid should display values of metrics for year 2012 in one column
and 2011 in another column for comparison purpose.
Metric headers are rows and year attribute is column.
Please note, the dataset is created with freeform sql.
Thank you in advance
This can be achieved using transformations in MicroStrategy. Please go through the link for more details.
Link to MicroStrategy Community
However, As you have mentioned that you are using a free form SQL, In this case write another pass of SQL like below and join result of this pass with original pass of SQL using Year column.
Select Fact.Year, Sum(Fact.Metric)
From Fact JOIN Lookup
on (Fact.Year = Lookup.Year - 1)
Group by Fact.Year

Select and manipulate SQL data, DISTINCT and SUM?

Im trying to make a small report for myself to see how my much time I get inputed in my system every day.
The goal is to have my SQL to sum up the name, Total time worked and Total NG product found for one specific day.
In this order:
1.) Sort out my data for a specific 'date'. I.E 2016-06-03
2.) Present a DISTINCT value for 'operators'
3.) SUM() all time registered at this 'date' and by this 'operator' under 'total_working_time_h'
4.) SUM() all no_of_defects registered at this 'date' and by this 'operator' under 'no_of_defects'
date, operator, total_working_time_h, no_of_defects
Currently I get the data I want by using the Query below. But now I need both the DISTINCT value of the operator and the SUM of the information. Can I use sub-queries for this or should it be done by a loop? Any other hints where I can learn more about how to solve this?
If i run the DISTINCT function I don't get the opportunity to sum my data the way I try.
SELECT date, operator, total_working_time_h, no_of_defects FROM {$table_work_hours} WHERE date = '2016-06-03' "
Without knowing the table structure or contents, the following query is only a good guess. The bits to notice and work with are sum() and GROUP BY. Actually syntax will vary a bit depending on what RDBMS you are using.
SELECT
date
,operator
,SUM(total_working_time_h) AS total_working_time_h
,SUM(no_of_defects) AS no_of_defects
FROM {$table_work_hours}
WHERE date = '2016-06-03'
GROUP BY
date
,operator
(Take out the WHERE clause or replace it with a range of dates to get results per operator per date.)
I'm not sure why you are trying to do DISTINCT. You want to know the data, no of hours, etc for a specific date.
do this....
Select Date, Operator, 'SumWorkHrs'=sum(total_working_time_h),
'SumDefects'=sum(no_ofDefects) from {$table_work_hours}
Where date='2016-06-03'
Try this:
SELECT SUM(total_working_time) as total_working_time,
SUM(no_of_defects) as no_of_defects ,
DISTINCT(operator) AS operator FROM {$table_work_hours} WHERE
date = '2016-06-03'