Metrics and MAQL
Metrics and MAQL
- 78 Topics
- 243 Replies
Hi there everyone, I want to be able to average number of days between Listing Date and Today. My metric looks as follow: Then I put the metric AVG of Vacant Days on dashboard and it has an error:Is it possible to calculate directly on Gooddata instead of creating a view in DW?Thanks a lot,Lena
I would like to know how to create a metric that sums up another metric for a period defined by a variable.Example:DataMetric A = SalesMetric B = date (inventary) ObjetivoMétrica C = Sales by period between inventaries Metric A Metric B Metric C Sales Inventary Salesda by period (Inventary)01/01 100 0 002/01 50 1 15003/01 125 0 004/01 75 0 005/01 150 1 350 06/01 100 0 007/01 25 0 0 Thanks
Hello,I am attempting and failing to write some MAQL queries.I have two datasets with the following fields (model simplified from the real world case, which has many more attributes for contracts):Contracts Vendor name Contract currency Contract value in contract currency Exchange Rates Currency Date Rate The Exchange Rates are stored as a rate between the respective currency and our company main currency. The exchange rate for the main currency being stored as 1.I need to build a report which shows list of contracts (by vendors) with several metrics, including contract value:in our company base currency in the currency selected in a dropdown selector of the dashboard (the exchange rate for the current date should be used for conversion)I have been trying to build the metrics, but I have not succeeded yet. I have started with creating a metric which would get the current day exchange rate for each contract:SELECT SUM( SELECT SUM(Rate) BY Date, Currency ALL OTHER )BY ALL OTHEREXC
Good Morning! Would it be possible to create a metric that would display the date and time of the last time the data was updated? Last time the dataset was updated within GoodData? If it were possible to create a metric I would display it inside a dashboard, showing "This data has been updated XX/XX/XXX at 00:00
Good Morning! I need to create a metric to compare sales for this month (until today) with sales for the same month last year, but in equal periods.I made a metric that compares the months, but I don't buy in equal periods being:SELECT IFNULL(SUM(SALES),0) FOR PREVIOUS (Month/Year (Data),12)❌ So he compares the following dates:06/01/2021 until 06/23/2021 (today) x 06/01/2020 until 06/30/2020.✔️ I need him to compare the same dates being:06/01/2021 until 06/23/2021 (today) x 06/01/2020 until 06/23/2020 (today). Thank you so much for your help!
When creating measures and designing dashboards in GoodData.CN, there may be times where you want a calculated value to remain the same after applying a dashboard filter. This is possible by creating measures with the WITHOUT PARENT FILTER keyword in MAQL. This keyword prevents any so-called Parent Filters from applying towards the measure. A Parent Filter is a filter that is applied to an object that uses the measure, such as an insight or dashboard. The keyword can take the following forms: SELECT … WITHOUT PARENT FILTERSELECT … WITHOUT PARENT FILTER EXCEPT …SELECT … WITH PARENT FILTERSELECT … WITH PARENT FILTER EXCEPT … In the MAQL syntax, “PARENT FILTER” can also be abbreviated as “PF”. So, “WITHOUT PARENT FILTER” can also be written as “WITHOUT PF”. In this article, I will lay out a few common examples of when you might use this feature. You can read more in our documentation. Common use casesOne use case is to have a dashboard with filterable insights where one or more insight
Good Morning!I need help to make a metic where I need to display the average sales for the last 10 days I tried to do it this way and I was not successful SELECT AVG(Sales WHERE (Date “in this case the day”) BETWEEN THIS - 10 AND THIS)In short, I need to return the average sales volume of the last 10 days.Thank you very much in advance!
HiThis article provides an example of writing a request to the system - https://www.gooddata.com/developers/cloud-native-community-edition/ like Active Users:SELECT COUNT(User) WHERE User Status = "Active"We have installed the system and cannot find a way to make such a request. Are they available there? Where could we go wrong?Thanks!
Hello, I would like to be able to change the metric displayed on the report based on a paramenter.For exampleA drop down box on the Dashboard has 2 possible selections A and B - only 1 can be selectedIf A is selected the formula for the metric is Z+YIf B is selected the formula for the metric is Z-Y I believe I would have to start by loading a phony table with just the values of A and B - and then add a filter onto the dashboard for the selection. But after that I am stuck. Thanks for your help
Timestamps - I need to calculate how many users were active each minute, having single intervals of their activity
Hello!The problem I’m struggling is how to create an AMR (Average Minute Rating) using MAQL. For simplicity I started with one day period when I want to observe how users activity changes over time (for example minute by minute). So I have data of a form:userID start time - atribute refering to Start time table having M, H, S values as a facts, start time label as a key HH:MM:SS and an atribute start time [min] HH:MM start day - date end time - atribute refering to table with a structure like Start time table already described end day - date activity detailsI was able to build a very inelegant vay to find out how many unique users were active during particular hour (e.g 20:45 HOUR = 20, MINUTE = 45), but with one major drowback which is that I need hour and minute as a variable to do those calculations. Here’s the MAQL form:I need solution that could be visualised - for every minute, automatically. Hoping for your help! I would appreciate any hints :)
Hello, I am trying to create a calculation to show the variance between the select time period (based on the dashboard filter) and the previous year. It looks like I need to use the previous function - but I am receiving the below error. When I use this calculation the result is always zeroSelect SalesCredit Business Line- SalesCredit Business Line where Year (Billingdatekey) = Previous
I have a bar chart that is using the basic “count of id attribute” for the measure. The problem that I have is that some of the “view by” values are missing from the chart if their count happens to be zero. I need to show all possible values of the “view by” column on the chart, even if their count is zero.
Hi there everyone,I was just wondering if there is a simple way to perform a DateDiff function in MAQL. More specifically I want to be able to count number of days between Order Date and Today. I will be using Order Status to determine whether the order was completed and this MAQL metric would help me in highlighting those that take too long. Thanks a lot,Tomas
Hi,I have a dataset containing sale orders, which includes:Order Date - Date the order was placed Customer ID - Unique ID for each customer Order ID - Unique ID for each order Customer Type - ‘New’ if it’s the first order placed by the customer, ‘Repeat’ for all subsequent orders £ Amount - Total order amount in GBPWe would like to introduce a Customer Segment, which is dependent on the reporting period (week/month/year) and is defined as:‘New’ if the customer placed their first order within the reporting period (regardless of whether they also placed repeat orders within the reporting period) ‘Existing’ if the customer placed their first order before the reporting periodI want to create a metric ‘£ New Customer Sales Monthly’ which is the SUM of the sale order amounts (£ Amount) for New customers each month.Note - if the customer places their first order in a given month and places repeat orders within that same month, then all of those sale order amounts should be included in the ‘£
Hello,I have:A fact named Workday (values 1 and 0). The dimensions attached to the fact: Company, Employee, Date. Companies are essentially our subsidiaries in different countries where different holidays are applicable, resulting in differences in maximum available Workdays.In my report I want to see metrics:A: the number of Workdays per Employee in a selected time period B: number of MAX Workdays any Employee had in the sae Company and in the same time period (basically how many workdays were available if a specific employee had worked on all possible days) C: % of A/BI am struggling to create a metric for B where I want to find the maximum number of Workdays any Employee in the same Company had within a chosen time period.The closest to what I need is when I define the metric B as follows:SELECT MAX(SELECT SUM(Workdays) BY Employee WITHOUT PF EXCEPT Date (Worked Date)) BY Company ALL OTHERHowever, as soon as I filter the report for any subgroup (specific employee, team, etc.) the
Hello! I’m having a problem trying to lock the agregation level in a result. I have a report showing : store, articule, sales and stock. I need that the sales metric doesn’t change despite the store.For example: if one articule had 3 sales in one store and 2 sales in other one, the report should show 5 sales no mather what store I am looking.
Hi I have a fact that can be Null at times.I can count the records where it is not nullselect count(attribute) where fact > 0.I am trying to count the amount of records that are null.I do not see anything in the MAQL guide for that. Is there a way?I tried fact = 0 even know I know null is not 0.I tried fact <=0 Neither worked.
Here is my Logical Data Model:For each WorkOrder have Ticket Created Date, Wo Created Date,… dimensions, when I add Ticket Created Date dimension then I can not use Wo Created Date or others in the same insight. I have to work around that I created a view to convert other Dates to text to display on the report (Ticket Created Date Text, Wo Created Date text,...).Do we have any solution or better ways of this? Please help me.Thank you so much!
Hello there. I uploaded our invoice data into GoodData and I would like to create a report where I will see how many days are open invoices past due. I do not have this number in my source data, I have just due date. Is it possible to calculate it? Thank you. Simone
Hi I created a metric based on two values that I’m using in an insight. However, when I use the metric ( a measure that simply chooses which of the other two measures should be shown) I get a message saying “Sorry, We Can’t Display This Insight”. And then when I use other data values, it moves into “unrelated data measures” Do the metrics need to be applied to the LDM? Or do I need to somehow associate the metric with a given dataset? Thanks James
Already have an account? Login
Login to the community
Sign in with your community account. This is different than your login to your GoodData account. Don't have a community login? Create an account
Enter your username or e-mail address. We'll send you an e-mail with instructions to reset your password.