QlikView Dynamic Date Comparisons - qlikview

I’m relatively new to Qlikview and have a dataset that shows metrics by date.
This data spans two years and the requirement is to have a comparison/variance that is dynamic and can handle the date filters on the report.
For example if the user selects 2018 this field should show the current date compared to the previous year date. Similar for Quarters, months, weeks and weekdays.
Ideally it should always show for the previous period. They’ve had this created in Excel but it can’t handle the amount of records and I suggested QlikView as I had created some other Dashboards in it.
I have tried set analysis though I struggle to see how that would fit into one expression.
Any thoughts would be appreciated!

I would say you would need two expressions, one without a set analysis (that would be filtered by your current selection) and one with a set analysis to guarantee that you only get today's value. This would be something like :
Sum($<[Date Field] = {"$(=Date(Today(), 'DD/MM/YYYY'))}>} [Value Field])
Check the date format conversion to see if it matches the date format of your field.

Related

Can we show values from two different timelines in one worksheet in Tableau?

My problem statement is described below :
I have a calculated field, say Opportunity. There is pre defined rule from organization, that the target value for current month will be 1/3rd of the value of 2 months back. For example, The target opportunity value for April will be 1/3rd value of February. I need to show the current month's opportunity and the targeted value in the same worksheet. How to achieve this is Tableau?
I am getting the base data from tables in Oracle through a custom sql query, and calculating the opportunity value in Tableau for each row, and then showing the sum for a range of time , say last 6 months.
The best way to do this would be to write the target value in SQL. It'll be easier (no need for data blending / complex calcs) and also more performant as it would be a hardcoded value in your dataset.

VBA - Graph by month

I am having issues trying to create code to make a graph that is dependent upon months. So I have Column A which is the beginning of the week date, i.e. 1/1/17. In Column B I have the count from that week of issues occurred. I would like to group together the count by month, using the Month function, so for January there are 37 issues, February - 23, etc. And then make a graph accordingly where the first month is titled January.
Eventually, I would like to similarly do this on a quarterly basis as well, but any help with the monthly issue first would be greatly appreciated. Here is a screenshot of the data which is located in Worksheets("Report").
First off, format your data as a table since that will make your life much easier. You will need to add headers to each column. This will make your data easier to read, and easier to maintain.
To format it as a table highlight the range, and then press CTRL+T. Make sure to check 'My data has headers'.
Good, now click inside the table, Insert > PivotTable. Select the destination. For rows you want Date, for values you want Sum of Value (where value is whatever you name your values column.
Then finally, check out this article for the whole rundown of Groupby: http://www.contextures.com/xlPivot07.html.
To be fair, there is an easy enough way of doing this without a PivotTable (adding a helper column for Month for example), but there's no need to reinvent the wheel. Additionally, if you want to add Qtr. eventually, you're better off familiarizing yourself with workhorses of excel.
Lastly, once you have taken the above steps, you'll likely find the Timeline slicer very helpful. You can use that to visualize specific periods on your pivot or chart.
Minor Note: This all assumes your dates are true dates. If they aren't, you'll likely run into more issues.

Business Objects - query with parameter based on a variable

I'm writing a report in Business Objects, and need to select data dating 10 weeks from the current reporting date to the current reporting date.
I have a query element telling me the current reporting date, and I have created a variable holding the date 10 weeks ago.
=RelativeDate([Current Date];-10;WeekPeriod)
I'm now editing the data provider, and add a query filter for the date range. However, I'm not able to select the variable as an object available in the query.
I feel that I'm missing something basic. How can I select my dates based on a database object date and a predefined range of dates?
Document variables cannot be used in the Query Panel. After your query is executed and a report has been generated, you can then filter it by using this variable.

Need Date Calculation MS Access

I need a flexible table that displays dates. By flexible, I mean, if I put in June 15, 1976, it displays as such. But if I put 20, Access calculates that 20 in the same field as today's date - 20 years.
I set the formatting of the date/time field in table: tbl_ageLimit to #, so it displays a serial date rather than a user readable date. This table has one field: ageLimit.
I am trying to develop a query to recognize if the date is not relevant in its current state and then convert it to something relevant and put it in another table that will constantly update.
Right now, I'm just trying to get formula to work on recognizing and converting the date. This is the formula that works splendidly in excel, but doesn't seem to be working in MS Access:
IIF([ageLimit]<=100,Date()-365*[ageLimit],[ageLimit])
It recognizes if the field has a number in it that is less than 100. But it's not doing the math and displaying a new record in the new table. Below is the sql:
SELECT tbl_ageLimit.ageLimit INTO tbl_allAges
FROM tbl_ageLimit
WHERE (((tbl_ageLimit.ageLimit)=IIf([ageLimit]<=100,Date()-365*[ageLimit],[ageLimit])));
Can someone kindly point out to me what I'm doing wrong? Thank you.
As requested, here are snapshots of the problem:
The table that is created is not showing the fifth record. Stumped.
Consider removing the WHERE clause as you do not need to filter records. Since you intend to evaluate the IIF() expression, place in the SELECT clause:
SELECT IIf([ageLimit]<=100, Date()-365*[ageLimit], [ageLimit]) As [age_Limit]
INTO tbl_allAges
FROM tbl_ageLimit

How to make MDX Range operator less restrictive?

I have a date dimension I want to filter on. I use MDX Range (:) operator for that. The problem is it appears that range bounds must be valid members of a set. I have IntDate attribute in my Date dimension, and it's an integer in the YYYYMMDD format. When I browse the dimension, there are 20120705 and 20120706 values, but not 20120704 or 20120707. Still, as far as range is concerned, both 20120705:20120706 and 20120704:20120707 encompass 20120705 and 20120706 and I hoped would return 20120705 and 20120706. But when first one works as expected, second returns empty set. The reason I need loose range to work is that users may enter date range that is not based on data in the dimension. How can I make this work?
The one that works:
The one that returns empty set.
Thank you,
Vlad.
Since your 20130707 member doesn't exist, the cube can't know where it was supposed to go.
It seems odd that you have a date dimension that doesn't contain all of the days in a month. I would suggest repopulating your date dimension so that it has all dates. You can get a fully populated date dimension from the Azure data market if you are using a tabular cube. If you are using multidimensional, you can have SSAS generate one for you. If you have parameters built off of dates, you can limit the list to populate them to show only the data for which there are measures using Exists.
I also wonder why you want users to enter dates rather than choose dates from a valid list. How do you handle the errors when they enter a value that is simply invalid? It seems the easiest/safest choice is to give them the list of dates from which to choose. If they are entering things that don't have data and you have error handling, the result should be the same as if they choose from a valid list.
That being said, you should be able to so something like the below. I check to see if the date is a valid member. If it isn't I substitute the first valid member I find in the list of members (you could choose your own date and insert it there). For the end of the range, I find the last valid member (again, you can substitute your own value).
{Iif(Count(Exists([Date].[Int Date].members, [Date].[Int Date].[20130704]))>0,[Date].[Int Date].[20130704], [Date].[Int Date].firstchild):
Iif(Count(Exists([Date].[Int Date].members, [Date].[Int Date].[20130707]))>0,[Date].[Int Date].[20130707], [Date].[Int Date].lastchild)}