Using IF statement with Fixed LOD - tableau-api

Excel1enter image description here  Excel2 enter image description here output expected in tableau enter image description here
I am having two data sources. One is Excel_1 and other coming from Excel_2. Now I have to extract some rows' data from each of the data source. For that, I used Fixed LOD with IF statement.
{Fixed [City], [Week number]: sum(if [city]='London' then [poplation_1] else [Population_2] end}
The output in tableau is not taking data from excel_1
So for London, I need to get data from Excel _1 but remaining city I want to get data from Excel_2.
One more condition is excel_1 has some wrong data for another city, except London, so I want to replace that wrong data from Excel_2 sheet data. For more understanding please use 'output'
Sheet in Excel (attached below). I am getting here is all city data, except London data.
Please guide me through the issue.
For more clarity please use this link: https://community.tableau.com/s/feed/0D58b0000Aibp07CQA

Related

Function to call the Name of a column in TABLEAU

I have a problem with Tableau.
I have a Dataset with some rows and some columns. I want to write a IFELSE structure where
The IF condition is that the Value of special field(fixed by a row and a column) is equal to the header of a column (it is every time equal to one name(header) of the different columns).
So to summarize: one value is every time equal to the name of a column and to find the column shall be the if-structure
Does someone know if there is a function to call the name (header) of a column? I didn't find it
Here is an small example, in which the Calculated_function choose the right price according to the Barcode. Everything in the first raw, is the header_name of the column below. enter image description here
Best regards
Jonas
You can work like this.
I created a sample dataset as given by you
Step-1: Connected With data in tableau. Clicked all columns having price (4 here), pivoted them so that they look like this..
Step_2: Create calculated_field like this
if [Barcode] = [Barcode_c]
then [Price] END
Step3: Filtered out null values from calculatedField and got a view like this which can be tweaked as per liking.

How do I use Tableau to populate the count of each dimension over a time period?

How do I populate the number of purchases and sales per day in tableau?
Here is my Sample Data:
In my first attempt, sales numbers are not counted to the exact date.
In my second attempt, I tried to tabulate by dropping sales date into the rows. However, it returned two figures - purchases and sales.
I have also tried Calculated Field but Tableau is unable to do a "for loop" like python.
First attempt:
After dropping Sales Date into the Rows. This is what I get:
Is there any way to populate it like this? Please help, I am still new to tableau. Special thanks to Fabio Fantoni for the first solution!
Desired Format:
I have another sample data (refer to sample data 2) which I would like to populate in the desired format (refer to desired format 2). In Sample Data 2, the purchase date "15/12/2020" is not reflected in sold dates.
My apologies but I may require some guidance as I am still new to tableau. Thank you in advance.
Sample Data 2:
Desired Format 2:
Based on this sample:
In order to bypass your double count for two different date columns, you may want to cross join your original data with a copy of it on original.Purchase = support.Sold, like this:
Doing so, you just have to create two calculated fields:
count Purchase:
count([Purchase Date])
count Sold:
Count([Purchase Date (Foglio11)])
The only thing you have to pay attention to is that in the second calculus you have to count Purchase date due to your "inverted" cross join.
You should get something like this:

How Do I generate Line Graph in PowerBI for the following Data

The Data I have looked like the Image below:
I want to create a line Graph,
The x-axis will have the Months (January to June), Y-Axis will have the Tot_QtY.
Considering that the date information is not in a single column but is spread out to multiple columns, How do I make a line chart.
Output I am getting is shown below:
The Output I need would look like this:
your input data is not correct, you need to model it so you get one column with rows of data. Click Edit Queries, this opens query editor.
Click tab Transform, select your columns and click unpivot.
My expectation is that you still need to work a bit more on your data because how the system knows from a column: MayDATE. that you talk about May. The best base data you can have is a column date and a colum value with data.

displaying data when table is null

I have a data table of inventory locations and the items that are on hand in that location. I have a separate data set of standard inventory items that are SUPPOSED to be in that location. I have a third data set of global part information. I can build report to show the part information and quantity on hand for a location, but when I try to display what should be in that location, the report stops showing parts data for items which are in the location, but should not be. The three data fields I am working with are:
{LOCITEMS.QTYONHAND} {STDITEMS.QUANTITY} {PARTS.PARTNBR}
In essence, I am trying to structure a report with the following format:
Part Number......Description.....Qty On Hand.....Standard Qty
When a part number is not included in the STDITEMS data set, it simply stops being displayed on the report. I would like Part Number, Description and Qty On Hand to be displayed but leave the Standard Qty field blank.
Been racking my brain on this one, but I feel I am too new to Crystal to see the forest for the trees. Any help would be greatly appreciated.

QlikView - Display datas from a field of a table

Can you help me to know, how can I display data in a chart only for a field of a table ?
For example, I have a table "Country" which have "France, Allemagne, Italie, ...".
In my chart, I only want to display datas from France, without any selection from the user.
Thanks for your help !
You can select certain values without user interaction with
set analysis.
Have a look at the 'QlikView Reference Manual' PDF.
Starting at page 799 you'll find the section about set analysis.
On page 801 you find the following description:
sum( {1<Region= {US} >} Sales )
returns the sales for region US disregarding the current selection.
In this case Region is the column with your country and US is the preselection.
Hope that helps