Solved

metric

  • 19 December 2023
  • 1 reply
  • 11 views

Hello

I want to revise my MAQL query so that it counts only 75% of the allocations and then multiplies that number by $177. For example 

I want the 75% of the 2088 hrs (2088hrs is 261 days) but it want to count only 75% which is 1566hrs * $ 177.

How the query should look like 

 

icon

Best answer by Moises Morales 19 December 2023, 23:05

View original

1 reply

Userlevel 3

Hello,

 

if the MAQL query logic is correct, then you could create a new query to make the arithmetic operations. For example, SELECT (SELECT new_metric * 0.75) * 177. I believe you are correct by using THIS, although you may need to define it as THIS - 260 days to count the previous 261 days. Also, please note that the THIS macro will work in the context of the date dimension you define in the metric, in your example I see you are using Week, but you should be working with days instead. 

 

Could you please try adjusting your metric? If this does not help, please let us know the new error you are getting. 

 

-Moises

Reply