In the data underlying my dashboard each row is a type of encounter, in the table I have rows as facility and columns show number of records by month. The issue I'm having is that the month columns stop where the data stops; for example in one facility the last encounter was in September, when the user looks at it the table stops at September, I need the table to show 0's up to the current month with each month in between (though not in the data) shown.
If anyone has any ideas it would be greatly appreciated!
Related
Alteryx
Table 1 is a google sheet file. It has x fields with primary key.
Every day to that table is added the weekday with the x data
For example:
Monday
Tuesday (is added on Tuesday) and so on.
My problem is that my workflow has a formula that does calculations with all the Weekdays.
Example:
Balance = All_Income - Monday - Tuesday - Wednesday - Thursday - Friday - Saturday - Sunday
But today for example, in the google sheet data I don't have the other weekdays except Monday and Tuesday, so I get the error "Unknown Variable" for Thursday.
I've inserted a Text Input and added all the weekdays.
I want to (Append maybe) these two data streams together so that I have all the weekdays there.
So if I run the calculations I have all the weekdays there.
Right now that formula works only on Sunday, when all weekdays are inserted as columns.
Any idea how to achieve this?
(p.s Creating the weekdays as columns in the google sheet with empty rows is not an option).
I managed to do it by creating a Text Input with the same column names (headers) as the other Data Source and performing a union.
Apparently I needed to perform a IF statement to check all Weekdays if they exist and replace the null values with.
If anyone encounters the same error, feel free to contact for help :)
Use the Transpose tool to verticalise the days of the week. Then Summarize using the primary key and sum the [value] field. That will give you the balance regardless of which days of the week are present in your worksheet. This technique applies to any problem in which one needs to aggregate multiple fields which may or may not be present or known.
Here is the simplest path to victory:
1. Input worksheet.
2. Connect Transpose tool.
3. In Transpose Key Columns, select only primary key.
4. In Transpose Data Columns, deselect all fields except for days of week and Dynamic or Unknown Columns. This will still work even if the worksheet doesn't have all the days of the week because as they come in, the Dynamic or Unknown Columns option will select them as Data columns.
5. In Transpose Missing Columns, select Ignore.
6. Connect Summarize tool.
7. In Summarize, group by primary key and sum on [Value] field.
From here, you can rename the sum_value field to Balance or something else friendly. You can also use a Join tool, joining on primary keys, to the original worksheet to get back to where you started with the new aggregated value.
My data contain a column showing the year of each record, ranging from 2005 to 2017 I am using the Time Slide extension (https://github.com/caallard/Time-slide) to help me visualize the data. However, the order of the year is problematic.
As shown in the following plot, the first year in the slider is 2006, while the last year is 2005, which means the first year somehow shifted to the last.
I further checked my data. When I uploaded my data to the Qliksense, the preview of the data in the data manager window looks like the following. The year is not in the right order. Perhaps this is related to my question.
I would like to learn how can I fix this. Thanks.
Edit
I have a workaround for now. There are two tables in my Qlik sense both have a column showing Year. Previously I linked these two tables with the Year column. I just deleted that link, and reference my time slide to the Year column from the other table. The sequence of the year in my time slide is normal now.
Here is the preview of the year column from my other table. The order of the year is normal, and I believe since I added this column to my time slide, the order of the time slide is normal accordingly.
However, the original year column I showed before is still in the wrong order. This is strange.
Edit 2
If I select the Time Slide extension in edit mode, below is the available under the Dimension. For the Sort by Numeric and Sort by Alphabetical, they both have three options: No, Ascending, and Descending. However, switching between these options does not affect the order of the year in Time Slide.
I have 3 tables, one with stocktakes conducted last year, one with stocktakes conducted this year and one with sales. All of them are joined by date to one table where I have dates.
Now the question is what can I do to get table with:
store name/ last year stocktake date/ this year stocktake date/ sum of sales from last year stocktake date to this year stocktake date.
If you choose store, than stocktake date from one table, stocktake from second table all looks good, the problem is that I can't get sales to show from/to.
C2Csales = calculate(sum(PP_SalesLessTax[SalesLessTax]),PP_SalesLessTax[date] >= [ly date])
[ly date] is just a measure with last year stocktake date
I have a feeling that this have to be very easy but have no idea how to get this work
thanks
daniel
please see data model. It is a part of bigger model but I have trimmed it so it is clear what is this about.
data model
And here is what I need. Please see picture.
thanks for all responses
result required
You don't need two tables to simulate years. You can have just one. The idea of last year should be calculated by a measure. If you have a complete date table with a day for each row without missing days then you can build time intelligence.
If I get you, you need something like this two measures:
Sales = sum(PP_SalesLessTax[SalesLessTax]
Sales LY = CALCULATE ( sum(PP_SalesLessTax[SalesLessTax] , SAMEPERIODLASTYEAR ( DatesTable[DateColumn] )
With this two measures you can take both of them on same visualizations to compare them.
The idea of having from and to can be solved on visualizations. The slicer with a date type column can create a range filter data that will apply for this two created measures.
I have a data sales "data" table, and a calendar table with every day in it. The tables are linked and I have the calendar table marked as a date table and the unique identifier setup as date.
I'm trying to do things like year over year calculations, and for some dates it works, and for others I get the contiguous dates error.
Also, it works sometimes. For example, I can do 6/1/16 to 5/31/17, but as soon as I add in 5/1/16 to 5/31/17 I get the error.
=CALCULATE([Total Sales], DATESYTD(Calendar[Date] ) )
Looks like the solution is here
https://powerpivotpro.com/2014/01/defanging-the-contiguous-date-selections-error/?nabm=1&utm_referrer=https%3A%2F%2Fwww.google.com%2F
I'm relatively new at Qlikview and wanted to compare some data from a selected year with its previous year.
In Qlikview I have a table in which i show the count of all the contacts there have been with the customer per mount [=count(contactsID)] with the dimension [contacts.month]
I want to show an other expression with the contacts with customers in the same month a year before.
So if my table shows all the contacts from jan-2014 until dec-2014 I want a bar next to every month with the months jan-2013 until dec-2013
for example jan-2013/jan-2014; feb-2013/feb-2014; etc
some extra information:
In the database is a date saved. In Qlikview i load that as:
load
date as contact.date,
Year(date) as contact.year,
Month(date) as contact.month,
Day(date) as contact.day;
If anybody could help i would be very grateful! Thanks to all of you in advance!
I got the answer on the Qlikview community!
Add expression as:
count({<contact.year={$(=contact.year-1)}>}ContactID)
http://community.qlik.com/message/517136#517136
You can solve this problem at the script side while loading data. So that you can compare year to date data with previous year with until corresponding month.
Transaction_Table:
LOAD date,productID,amount
FROM data.qvd;
concatenate
Load AddYears(date,1) as date,productID,amount_1
Resident data where date<=AddYears($(=max(date)),-1);
There will be two coloumns "amount" is current date's data and "amount_1" is previous year's same day data.