Tuesday, 1 December 2015

How to show Count of Order ID for Selected Dates.


If we want to show the Count of Order ID for 1 any Specific Date, we can use the Calculated Field like below,

count(  if [Date] = [Date_Parameter] then [Order_ID]) end )

"=" operator used  to filter & show 1 Value only. And there is no "IN" operator in Tableau, alternative is "OR" Operator.
For more Details click on Alternative for "IN"

Some times Customer may want  to select Multiple Dates, in that situation we have to use "Quick Filters".



Note: We can pass Max 1 Value at a time from Parameter. Look @ Tableau Viz: Parameters - Tableau

if you want to select multiple Dates then go for "Quick Filter"

1) Drag the Order Date field onto work Area, then convert onto Full Date.
a17.PNG
a18.PNG
2) Right click on Date on the Rows/ Columns shelf then click on "Show Quick Filter".
a19.PNG

3)  then crate calculated field like below
count([Order_ID])
a20.PNG
4) Now we can use the above calculated field to get the desired Result.
a21.PNG
5) If you don't want to show Dates on  the Report, Drag out the Order Date from Rows Shelf.
a22.PNG

6) Now it will show the count of Order ID's for Selected Dates (Will not Date wise, since we removed Date in the above step).
a23.PNG
a24.PNG


No comments :

Post a Comment