Quicksight minimum of two value - amazon-quicksight

I would like to add the following formula in quicksight :
X/Min(y/z)
However the formula return an error and i could not find any to return a minimum of two values.
I did try ifelse function, but returns wrong data.
Please help
Regards

Related

Google Sheets: Get First Value in Column

I need to find the first value in a column range. I've previously had help to find the last value in a column range, such as:
=INDEX(E4:E188, MATCH(999^99, (E4:E188)))
However I haven't figured out how to convert the above formula to return the first value instead. Any suggestions would be appreciated.
Although I'm not sure whether I could correctly understand your expected result, how about the following sample formula?
Sample formula:
=INDEX(FILTER(E4:E188,E4:E188),1)
Testing:
Reference
FILTER

Is it possible to have a constant value in a calculated field in QuickSight?

In QuickSight, when you want to define a constant value to reuse it in visualizations later, you can try to set it as:
Calculated field: goalFor2020
Formula: 20000
But right now it doesn't allow you to put just a number in the formula.
Is there any way to do achieve having just a number in the formula of a calculated field?
The reason we need it is just to have a number that doesn't depend on any data, just manually defined by us.
Interesting, QuickSight lets me insert a number into a calculated field, just fine.
Since that isn't working for you, I'd recommend using a parameter with a default value. For example,
Parameters essentially has the same "rights" as a calculated field (it can be used in visuals, other calculated fields, etc...). It can also be passed via query parameters which may or may not be a feature that you'd find useful.
Another cool benefit of using parameters is that, if you're embedding QuickSight, you could retrieve this value dynamically and pass it to the dashboard. Then if you wanted to, say, generalize your for different yearly goals, the goal could be passed and dynamic (rather than hard-coded in a calculated field).
We could achieve it with a trick, just apply some function that returns a number to one of your columns, and make it 0, then add your constant number:
Calculated field: goalFor2020
Formula: count(email) * 0 + 20000
It does the trick, but there might be a better way to do it.
I have tried something like this:
distinct_countIf({dimension},{dimension}='xxx')*
+distinct_countIf({dimension},{dimension}='xxx')*
just makes the discount_countif meet the requirement, so it will return to 1. And use 1* the number you want to hardcode. If the requirement does not meet, it will return 0 so it won't add up the number

Trying to return the maximum value of a filtered date column in Power BI

I have a table within Power BI that has a date field, and a value field. I am filtering on this date field, using a slicer, to sum all of the value data before the specified date. I would like to get this date value to use in a LOOKUPVALUE() elsewhere (to get a conversion rate).
Is there a way to accomplish this?
I have tried the DAX functions that return the values of a particular table/column with filters preserved but this never seems to work, and just returns the entire dataset, e.g. VALUES(), FILTERS(), ALLEXCEPT().
Any help would be greatly appreciated!
I found a solution using measures.
The DAX for future reference:
Filter Date = CALCULATE(MAX('Table'[Date]),ALLSELECTED('Table'))

How to implement percentile in Hive?

Can anyone please tell me ,how to implement Percentile in Hive?
I tried with percentile function,but not able to get the expected result.
Example code will greatly help.
Use the percentile function, as per the product documentation:
Returns the exact pth percentile of a column in the group (does not work with floating point types). p must be between 0 and 1. NOTE: A true percentile can only be computed for integer values. Use PERCENTILE_APPROX if your input is non-integral.
If you are not able to get 'expected result' then your going to add a lot more detail to your question, as in what is the data, your query, and the expected result.

How do I select the value of a random cell in a range?

In OpenOffice Calc, I'm trying to select the numerical value of a random cell at a time, from the range H3:AF21.
I have tried the INDEX function and it does't seem to work, I get errors no matter what I choose, except if it's a single cell. Can anyone help?
Try whether the following formula fulfills your requirements.
=INDEX(H3:AF21,INT(RAND()*19)+1,INT(RAND()*25)+1)
Greetings
Axel

Resources