Percentile Category group in DAX - dax

I have created 3 percentiles namely 30, 50 & 65th Percentile for frame size. And these values I need to compare with values in another table to get the attractiveness with the below logic. Can anyone help to get it in dax code.
Attractiveness If 65th percentile > Gold --> Attractiveness = High
ELSE,
If 30th Percentile > Bronze --> Attractiveness = Average
ELSE, --> Attractiveness = Low
Tables

Related

Finding weighted average

I am trying to figure out what my overall average speed is while on a bike.
I have miles traveled in column 1 and then avg speed in miles per hour in column 2.
The problem is that I have different distances associated with the differing speeds, so I cant juts average my all of the speeds to get an accurate average.
How do I find the overall average speed, weighted, so that I have the actual avg speed?
Distance
9.82,
8.69,
8.43,
9.07,
8.16,
12.41,
7.22,
3.13,
10.28,
9.79,
10.44,
Avg Speed
18.4,
12.8,
16.7,
18.1,
16.2,
19,
13.5,
16,
10.9,
16.8,
15.6,
How overall average speed should be calculated? As
Vavg_total = Distance_total / Time_total
We can find total distance as sum of stage sizes, and time as sum of stage times
Distance_total = Sum(Distance[i])
Time_total = Sum(Distance[i] / AvgSpeed[i])

How to fill a collection with randomly collected elements in limit of total weight?

I have 30 elements with different weight stored as number like 50, 100, 300 etc. After query received with "limit" argument, I need to response with array of randomly collected elements with sum of it weights, not above queried limit with some deviation allowed. As it's elements collected randomly, multiple variations for one query also allowed.
In examples I have deviation set to 30.
Example 1, query for limit 560. I response it elements with weights 300, 150, 50, 40 in sum of 540.
Example 2, query for limit 160. I response it elements with weights 150, 40 in sum of 190.
I don't know, may be there's some algorithm previously invented for such solutions? Or not and I must develop it by myself?
Thanks much

how to find the percentage between 2 numbers with 2 conditions?

I'm having trouble finding the formula for percentages
I have to calculate the employee bonus
e.g. on April 8, 2022, we have 90.13% of the standard developed, the same on 04/04/2022 is 108.54%
where 90% is equal to 3.75% of the bonus and a maximum of 120% is equal to 15% of the bonus below 90% of the worked norm, the employee will not receive a bonus
I need to find a formula that will calculate how much the employee's bonus will be
https://docs.google.com/spreadsheets/d/1xtf9ZUecahZTnB6dNKQAKMO7e1qTmv6qbNHsQ0wWpI0/edit#gid=51882774
89.99% = 0%
90% = 3.75%
90.13% = ???
108.54% = ???
120% = 15%
130% = 15%
140% = 15%
150% = 15%
Anyone can help me with this ??
Image preview
My browser won't view the image for some reason, so in this answer I'm assuming that the 'Percentage of standard developed' is column A, please change cell references to suit.
in Cell B2 (or a different column) enter the formula;
=IFS(A2<90%, 0, A2>120%, 15%, TRUE, A2*37.5%-30%)
Here is a dynamic formula for covering the range you specified. It will help you understand how to come up with the numbers. Given the conditional formatting, I think you already know when not to apply it.
=$A2+(B1-$A1)*($E2-$A2)/($E1-$A1)
Basically you start with the lower bound for the percentage
3,75 then you calculate how many steps you took from 90 and multiply the number of steps by the ratio of step range (120 - 90) to the percentage range (15 - 3,75).

filter cost center with GL account and take the total

I am trying to filter the column "E" with each cost center, column "L" with each GL account and get the sum of amount column "I" in new sheet with entire row values. Also the negative amount to be highlighted. There are 75000 rows with 200 cost centers.

How to find algorithm order of growth classification?

I have an algorithm with 3 different test data that doubles in size each time.
Here is the run time in seconds for each test data:
Size , time(s):
20 , 0.001
40 , 0.016
80 , 0.047
Form this how do I get the order of growth classification?
Do I need to find the cost of the algorithm first? By evaluating each line?
Or do I plot it and make a log-log graph?
Its the A* path finding algorithm, I am starting with grid size of 20 cells, and then I am doubling the grid size each time, does the data double? Or quadruple? Since it will have 20*20 amount of cells, 20*20 = 400, 40*40 = 1600, 400 is not half of 1600, so by doubling the "grid size" am I doubling the data or quadrupling?
Any help will be greatly appreciated.

Resources