Alerts in Metabase - Input variable based reports - report

We have created alerts (for reports without input variables, like stock report) in metabase and are working fine.
We have created sales reports for client which is based on date range.
Now client ask for alerts on sales reports on daily basis, that means, default value for From & To date should be Today's date.
We have set alerts but not getting in our mailbox.
Can you please let me know how can i achieve this?
Today's date as default value in input variable
Get report in my inbox every morning.

I have removed variables and used cast(now() as date) to get data for current date and alert was set at EOD, so it is working as expected.
After doing this when i set alerts, i got report in my inbox at scheduled time.

Related

Show LAST REFRESH timestamp in a PUBLISHED report on POWERBI SERVICE

I already checked Stackoverflow for an answer, but I only found question related to showing a timestamp in PowerBI Desktop, which is pretty different from the behaviour in the PowerBI Service, e.g. see
How to display current date and time in power bi visuals?
Visualizing last refresh date in power bi
Why?
I don't want to see in my report the timestamp of the current date
and time, since I already have this in the status bar of my
operating system.
I don't want to see in my report the timestamp of
the last "report" refresh, when only the measures get updated (like
in the Service).
I don't want to see the timestamp of last re-import
of (most-likely unchanged) data in the Desktop/Service.
What I want to see in my report is the timestamp of the last "dataset" refresh in the Service, which cannot be achived by a measure, but a M-function only!
The problem now is that the Service runs in UTC time, while I'm of cause interested in local time, and all the M-functions to convert a datetimezone number only only accept a fixed time-shift in hours, but do not consider daylight savings.
How would a solution look like to properly overcome this deficit and to show the proper local time of the dataset refresh in a PBI Service report?!
For whatever reason, Microsoft hasn't built in native daylight saving handling yet but please vote for them to fix this here.
However, various people have suggested workarounds involving defining the dates/times when DST changes things or referencing an external oracle.
https://intellitect.com/convert-utc-local-time-daylight-savings-support-power-bi/
https://blog.crossjoin.co.uk/2017/03/28/daylight-saving-time-and-time-zones-in-m/
https://powerpivotpro.com/2019/01/dst-refresh-date-function-power-bi-service/
https://radacad.com/solving-dax-time-zone-issue-in-power-bi
As a workaround I've been pulling the proper local time from worldtimeapi.org so far, see e.g. this PowerQuery M-script:
let
Source = Json.Document(
Web.Contents("http://worldtimeapi.org/api/timezone/Europe/Berlin")),
#"Converted to Table" = Record.ToTable(Source),
#"Filtered Rows" = Table.SelectRows(
#"Converted to Table", each ([Name] = "datetime")),
#"Removed Columns" = Table.RemoveColumns(#"Filtered Rows",{"Name"}),
#"Changed Type" = Table.TransformColumnTypes(
#"Removed Columns",{{"Value", type datetimezone}}),
#"Renamed Columns" = Table.RenameColumns(
#"Changed Type",{{"Value", "Europe/Berlin"}})
in
#"Renamed Columns"
However, I just realized that this has become somewhat obsolete meanwhile:
In the PowerBI Service switch the New Look to ON and then in the title bar next to the report name you get e.g. "Data updated 26/04/20" and in the drop-down menu you can even see the exact update time.

PowerBI show wrong data by connecting with Google Analytics if I apply a Data Filter Inside the query

I'm getting the same kind of issue with "Events".
I'm trying to track the creation of Invoice Disputes (when the clint detect some error in the invoice) for March '19.
The thing is that when I get the data for the event without filter nothing in the query (in order to use the filters on the Report tab) I get the value of 316. BUT i know that the correct Value is 302.
Wrong Value
So I tried to filter the month directly on the query before load the data and guess what? the correct value shows up.
Correct Value
Any ideas?

In Google Analytics - how do I link directly to today's statistics?

In Google Analytics, I am trying to create a link that navigates directly to today's statistics.
When choosing today's date from the menu, it populates the URL with the date range selected, as follows:
.../_u.date00=20190130&_u.date01=20190130/
Is it possible to create a dynamic populates today's date? Such as:
.../_u.date00=today()&_u.date01=today()/
In an unsupported way, you could set your dates to something in the future:
.../_u.date00=21190130&_u.date01=21190130/

Base one datetime filter on another datetime filter in SSRS Report Builder

I'm looking to either show an error message (fail) the report, if the end time filter is selected as being earlier than the start time filter, or disallow a user from selecting an end time that is before the currently selected start time.
Any ideas? I do not want to lose the pop up calendar functionality for the end time filter. I also don't want to set any kind of default value for the end time based on the start time.
I think Error message is your option.
I looked into this earlier, I couldn't find much on it. Can't really restrict what user can pick unless you want to put valid available dates into a dropdown. If you want the datepicker(popup calendar) and you don't want to set a default for end date based on startdate, then just let the user pick, check if #EndDate < #StartDate either in you query or in an expression of the item you choose to display your message to the user.
Hope it helps

Setting report to current date

I have a report where it shows meetings and their requirements. However i just want the report to show ONLY today's stuff--not the entire week's worth.
I tried setting my group header (i'm grouping by day) to currentdate but yet it still shows me the entire week. I then have to go to the grouping tree and select today's date. Is there any way to run my report and have it ONLY show today's stuff and nothing else???
Any ideas?
Use the select expert to limit the results to today's date. printdate is a special Crystal Formula keyword.
{table.date_field} = printdate
Or, if you're working with a datetime db field you can strip the time with CDate
CDate({table.date_field}) = printdate
One way would be to change your query so that it's only getting one day's worth of data; that is, assuming your data contains a date field. To take it a step further, you could add date parameters to the query itself and leave the group headers as is. That way, you can have one day of data, or data from a specific date range.
If you have no influence (or desire) to change the way data comes into Crystal Reports, you could also add a formula via the Section Expert to suppress the group or detail section unless the date is the current date.

Resources