Truncating dates in dc.js - d3.js

Say I'd like to sum up the number of sales I've made per month, and I have the datetime which sale was made. I also have sales from different years. Is there a convinient way to "truncate" dates so datetimes in the same month and year are equal in dimension? My only solution so far is setting all dates to have day of the month 1.

Related

How to calculate month and any additional days between two dates using google sheet formula?

I want to calculate month between two date and output how month and any additional days by using google sheet
I use this formula to calculate month but i don't know how to calculate any additional days after a complete month.
DATEDIF(AG2,TODAY(),"M")
Quoting this reference of DATEDIF (emphasis mine): https://sheetshelp.com/datedif/
Syntax
=DATEDIF(start_date,end_date,unit)
start_date Date at which to start the calculation
end_date Date at which to end the calculation
unit Type of output. Choices are “Y”, “M”, “D”, “YM”, “YD”, or “MD”.
...
"M" – Number of whole months elapsed between start and end dates
"MD" – Number of days elapsed after the number of months shown with the “M” or “YM” unit. Can’t go higher than 30.
...

Is there any way to use first and last functions in rpd for one measure column in OBIEE?

I am building an rpd and one of the requirements was the following. We have one measure column DEBIT_ALL in a fact table . This is a sum of all debits that client had since the creation of that client's account. That is this sum always accumulated whenever there is an debit operation.
So in OBIEE users create analysis to see the Debit_all value for some period using date1 and date2 in filters, or just giving month or year value. The easiest way to calcute this amount for some period is to substract sum in date1-1 from sum in date2.
That is value of debit_all measure for period from date1 to date2 is equal to:
value in date2 - value in (date1-1)
Can we do this in rpd admin tool? I had an idea to use first and last functions but couldnt find a proper way.

Is it possible to order split series in Kibana histograms using the values of the split buckets?

Say I have an index of product sales where each document is an individual sale for a specific product. I can use Kibana to chart a date histogram of sales counts, bucketing by every month. This would be the frequency of product sales every month. Here is an example:
Sales per Month
I can also split that series using a terms aggregation on the product name, so I end up with the distribution of those sales across each product each month like so:
Sales across Products per Month
What I can't do, which seems straightforward, is sort that distribution by the product count in that specific month. I can sort it alphabetically, or by the overall sales of that product, but I can't do it using the sales during that month. This means that if the most popular product overall is at the bottom of the bar (like the green product in the above image), it remains at the bottom always even if the sales count of that product for a particular month is lower than everything else.
Is it possible to order this series by the product count in each month? In general, is there a way to order a split series by the value of each 'split'?

rainmeter calculating percentage of a school year minus holidays and weekends

How can I, in rainmeter, calculate the number of school days between August 19th 2014 and a certain date? As in, I want to be able to calculate the percentage of how far into the school year today is. So far I have something that calculates the number of DAYS between to dates, but I need to be able to calculate the number of school days too.

Writing a weekly recurring time interval (ISO 8601)

i need a correct weekly ISO 8601 recurring time interval.
For example, repeat:
Each Monday, 19:00.
I already tried a lot of examples, but nothing worked correctly :-(
Thx for any help!
R/2014-W01-1T19:00:00/P1W
Represents a unbounded recurrence with a start date and a duration of one week. The recurrence starts at the first day (Monday) of the week number 01 in the week year 2014. I have used a week date, but you can substitute it with a calendar date or ordinal date, just make sure the date falls on a Monday.

Resources