In Salesforce Lightning I have built a report for clients with their meeting date and notes. I would like to create a calculation or use a filter that will only show the last meeting date and note.
In the filter section I have tried to use Created date filtered by "Last Activity Date" , Last 7 days etc but I can not find anything that will just show last meeting date in general.
Related
I want to know if it is possible to have 2 date range controls on my page. Each date range control would be connected to a different date (Purchase date / Consumption date) of our products).
Here is a simplified editable copy of the data studio report.
The Google Sheet source looks like:
ID
Purchase date
Consumption date
Product
Price
ABCD12
21/03/2022
09/11/2022
A
£50
EFGH34
22/03/2022
22/11/2022
B
£80
IJKL56
23/04/2022
15/11/2022
A
£50
MNOP78
24/03/2022
06/12/2022
A
£50
The output I'm looking for is to be able to filter data so that I can answer the question "how many products were purchased in March 2022 that have a consumption date in November 2022". The expected output is as follows:
ID
Purchase date
Consumption date
Product
Price
ABCD12
21/03/2022
09/11/2022
A
£50
EFGH34
22/03/2022
22/11/2022
B
£80
Supermetrics has a Date Picker that essentially does what I need it to do. But it has 2 downsides 1) it is bulky and does not work well with many years of data and 2) It does not allow breaking down to more than a monthly level.
Is there another way to make this happen with parameters?
Through this post I've gotten as far as getting a 'switch' for my graphs and tables between the two date datapoints, but that is not the solution I'm looking for.
actually you did find already a good solution by the 3rd party Add-one "Date Picker" from Supermetrics. An alternative route is to include two tables which only have the consumption date as a column. The user can then select these and do a cross filtering of the main table.
In the first table, the dimension has to be changed to "Year Month":
An alternative community visualisation to the Date Picker (based on the limitations cited in the question) would be the Range Slider.
Two Range Sliders could be used (one for each date field), however, the below will use one Date range control and one Range Slider to demonstrate that they can work together (as well as maintaining the original setup in the question):
1) Purchase date
1.1) Date range control
1.2) Table
Date Range Dimension: Purchase date
Dimension 1: ID
Dimension 2: Purchase date
Dimension 3: Consumption date
Dimension 4: Product
Metric: Price
2) Consumption date
2.1) Range Slider
Column to filter on: Consumption date
(Chart Interactions) Cross Filtering: ☑
Publicly editable Google Data Studio report (embedded Google Sheets data source) and a GIF to elaborate:
I have a report with one data source in Google Data Studio. The data is at month level inside the BigQuery table YYYYMM (for example 202001). I have a filter that is set on the year-month dimension which works ok but I would like to add a default value which changes to last month(max(year_month)) available in the table.
Is this possible? I only found the option to hard-code the default selection but this can't be updated dynamically
as in this screen shot
Jaishree's suggestion
You can create an another field/column as same year-month and always keep the latest year-month value as "latest month" or any name you want. You can use logic like
when existing_column = max(year_month) then "latest month" else existing_column
Something like this
existing_column new_column
022020 latest month
012020 012020
122019 122019
112019 122019
You can pass this "latest month" value in the default selection option this option which is just below the dimension. But each time you upload new data you have to update this field like change the table suppose for next month you table should be like
existing_column new_column
032020 latest month
022020 022020
012020 012020
122019 122019
112019 122019
You can make auto update by scheduling queries as well in big query from where you are loading data to Google data studio.
It can be achieved by setting the Date Range (at the chart, report level, Date Range Control, etc) to Last Month.
First, a YYYYMMDD Date field needs to be created at the Data Source. This can be done using the CONCAT function to add a Day (the 15th is used in the formula) and then using the TODATE function (although in this case the TODATE function is not required, however, adding it as best practice):
TODATE(CONCAT(Date, "15"), "%Y%m%d", "%Y%m%d" )
Adding a link to post on the Google Forums (Nimantha; 10 Feb 2020) which also has a GIF to demonstrate the process above as well as adding the Date field at the Report Level.
You can do it by creating a new field where rows that belong to the current year-month are labeled as 'Current Month' while the others could use your preferred formatting (I'm using "%Y%m - %B %Y" as it allows me to sort report dates in a drop down list).
To do so, you need your date column and CURRENT_DATE() in the same format with the help of FORMAT_DATETIME(). Then, you can use CASE WHEN logic as follows:
CASE
WHEN FORMAT_DATETIME("%Y%m", MyDateColumn) != FORMAT_DATETIME("%Y%m", CURRENT_DATE())
THEN FORMAT_DATETIME("%Y%m - %B %Y", MyDateColumn)
ELSE 'Current Month'
END
Finally, you could use a drop down list control with the new field and use 'Current Month' as the default selection. The main advantage is that the code above will be evaluated every time data is refreshed so no extra automations needed.
Hope it works for you.
Salesforce:
Every account has an agreement with my company. Once they have an agreement in place, they can start ordering products.
In the account record, I have a date field called "Agreement Approved On".
Ordered products are represented as "assets".
I want to create another field in the account record called "First Order Amount". This field should be populated dynamically, and should calculate the following:
Look for all of the account's assets created after the date field "Agreement Approved On".
Summarize the total of all assets ordered during the first order (within the same day).
Within the same day:
Let's assume the agreement was approved on January 1 2017. The
account started ordering on January 5 2017.
During January 5 2017, the account made 5 orders (8 different
assets), total is $1,000. This is the first order total - within the same
day.
After January 5 2017, the account made more orders, but they don't
count towards "first order amount".
So my question is - how do I create this "First Order Amount" field?
Thanks!
You need to setup a oncreate trigger on Asset taht will update the first order total amount field on Account.
In the trigger check whether now() > agreement approve date. If yes, check if there are any other assets with dateCreated < TODAY.
These two conditions will check whether there are any existing account assets and if the date is > agreement date. If there are existing assets, it means this is not the first order.
You can then get all asset amounts and add them and write the final amount to the account field.
See https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_triggers_context_variables.htm
for trigger syntax
and https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_select_dateformats.htm for date functions and literals.
The content that i want to show is random pictures in views block. Few of them needs to by shown on January, others on February, others on March, and so on.
Showing of specific content will reapeats every year (example: only in january in every year)
I have created vocabulary for that content type with "January", "February", "March" as values. Every photo has one of these values.
And now is the part where i am stuck:
I want to add views filter which points to that vocabulary with additional actual date rule, like:
IF date('m') = january THEN set filter to Vocabulary Months = January else
IF date('m) = february THEN set filter to Vocabulary Months = February ... and so on.
Can someone tell me by wich modules i will achieve this?
I did this already by using Date Repeat module but for user it means, that he needs to put some extra values in 3-4 additional fields - and that is "not simple".
Any advice?
I'd switch from a taxonomy field to a date field (i.e. set month as a date field value on the images), then use the current relative date as a filter.
Is it possible to use multiple run calendars for one job in AutoSys r11.3 ?
For example I have calendars:
cal_1 for 2nd working day of the month and
cal_2 for 3rd working day of the month.
Now I have a job that needs to run on both second and third business day of the month. Is it possible to club both the calendars, not having to create a new calendar just for this job.
I don't think so there is a utility to combine two calendars explicitly. However, the calendars are nothing but set of dates as defined/specified. Just get the days from both the calendars and club them; and then use them to add a new composite calendar which has both set of dates.
My idea would be to use CLI utility autocal_asc to get all the dates from both the calendars and append to a file(only the dates; grep if you need to or a similar processing). Once you have the file ready use to autocal_asc once again to create the composite calendar with the dates.
Or you can just add the dates from one to another in a very similar way.
You need not to prepare two calendars just to get the two working days of a month. Instead prepare the dates of a calendar for all the months which you wanted to run by excluding the non-working days (Saturday & Sunday) and holidays.
Now you can create a standard calendar and can give the exact working dates which you get after excluding the non working days and holidays as shown below.
Now I am going to add an ad-hoc date using the standard calendar.
C:\Program Files (x86)\CA\Workload Automation `AE\autosys>autocal_asc`
CA WAAE Calendar Utility
Please select from the following options:
[1] Administer Standard Calendar.
[2] Administer Extended Calendar.
[3] Administer Cycle.
[4] List all Calendars.
[5] List all Cycles.
[0] Exit CA WAAE Calendar Utility.
> 1
Administer Standard Calendar
Please select from the following options:
[1] Create a Calendar.
[2] Add dates to Calendar.
[3] Delete Calendar dates.
[4] Delete an entire Calendar.
[5] List dates for a Calendar.
[6] List all Standard Calendars.
[9] Exit from "Administer Standard Calendar" menu.
[0] Exit CA WAAE Calendar Utility.
> 1
Calendar Name: adhoc-days
Date (MM/DD/YYYY [HH:MM]): 01/02/2017
Date (MM/DD/YYYY [HH:MM]): 01/03/2017
Date (MM/DD/YYYY [HH:MM]): 02/02/2017
Date (MM/DD/YYYY [HH:MM]): 02/03/2017
CAUAJM_I_50430 Insert Successful for Calendar: adhoc-days