In the sample super store,how to get customers buying only furniture and not office supplies or technology [closed] - tableau-api

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
In tableau for its sample super store dataset,I need to get the exclusive customers who buy only furniture and not office supplies and technology.
Want to display the exclusive customer names and their sales.

You can put Customer on the Filter shelf and on the condition tab, use the following formula min([Category] = "Furniture") For boolean expressions, True > False, so MIN(condition) is true if and only if condition is true for every record. MIN() for booleans can thus be read as "every()" and MAX() can be read as "any()"
If you work with this group of customers a lot, you might want to define a set of Customers that only buy furniture, instead of a filter. There are lots of ways to think of sets, but one is just as a saved named filter.

Related

How do you represent either / or within a use case diagram? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 1 year ago.
Improve this question
I am making a use case diagram for a school and was wondering how I can show a degree course is either full time or part time and then each degree contains 1 to 10 courses.
Thanks!
The rules you are giving in your question are not captured in the use case model, but in the domain model. The description of a use case is influenced by the domain model. Like for example a use case enroll for term will describe steps where the user enters one or more courses. For a domain model you would create a class diagram.

JCL/REXX - Members in a PDS [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 4 years ago.
Improve this question
How can I create a member in a PDS using either JCL or REXX? The member's name must contain the actual date. Is that possible?
It can be done in JCL and by Rexx. You need to remember that member names are a maximum of 8 bytes and cannot start with a numeric so you would need to use something like the 'Julian' date e.g. 2017365. You may have system variables available to populate your JCL - check the JCL manual and level of Z/os that you are using.

RESTful API - Get last of an element [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
What's the best practice for getting the last added element (let's say we know that because of a created_at field on the resource).
Should it be a call to the get all with max results on 1 like:
GET ../rest/v1/article?page=0&size=1&order=created_at,desc
and will return an array of one element
or maybe an "special" call like:
GET ../rest/v1/article/last
and will return an element.
I am looking for a best practice if there's one pattern for this.
Thanks!
I'm not a RESTful expert, but in my opinion the first solution seems the best.
The second is more practical, but routes are often associated with resources, the addition of a "last", especially preceded by a "/" seems strange to me.
In addition, API users usually use the sorting parameters, and what about users which need 10 last elements ?
If you add something after ../rest/v1/article, it must be an ID for one particular element, a sub-resource, or for actions that are outside the CRUD like ../rest/v1/article/:id/subscription.
Both URLs are RESTful and identify a Resource. Of course the first would return a collection containing a single element while the second would return this element directly.
The first form will be automatically supported if you support paging and sorting at all.
You write
or maybe an "special" call
I don't see this as an 'or', it should be an 'and'. The second form is optional and it could be helpful. If you have an URL pattern like
GET ../rest/v1/article/{id}
it is easy to implement logic that can distinguish normal IDs like, for example, 123 or A567 from special IDs like 'last`.

RESTful URL design - how to query using OR parameters [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 7 years ago.
Improve this question
How would you design a RESTful query to support OR and AND operand between parameters. Let's say my resource has three fields field1 & field2 &field3. How would you design the URL to enable the following query:
"Get myresources where field1=x OR field2=y AND field3=z"
I would probably encode a normal form (eg. CNF) of the relation between the fields somehow. For example:
http://myurl.com/get_myresources?field1=x&field2=y&field3=z&relationcnf=1OR2AND3

Example of State monad in business application [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
I am looking for a simple example of State monad in a business application.
I have found good examples -- memoisation to calculate Fibonacci numbers and random numbers generation -- but I would like to see an example from a business domain (preferably in Scala).
For example, I can easily find examples of using Option, Either, List, Reader, and Writer monads:
option : look up an entity (order, product, customer, whatever) which does not exist
either : any failure
list : customer orders, order items, etc.
reader : read any entity from the database
writer : write to the log
Now I am looking for something similar for State monad, i.e. any stateful computation with a mutable state, as I understand it.
The typical application where I reach for State is where I need a supply of values, like a random number generator or a supply of unique identifiers.
Another typical use case is testing an application that interacts with a database. Using State, you can simulate an in-memory database and check that the program manipulates the database in the expected way.