How to set last 2 months as default filter in a power bi dashboard - powerbi

The user when opening the dashboard needs to see the last 2 months filtered with slicer not selected
if user select any date in slicer, then the graphic should be filtered according to the slicer (not only 2 months)

You can use the relative data filter to show the last two months of data on your report. This will track over the time without needing to update the date.
What you can then do if you need the user to put in their own date range it to use a bookmark to remove the date filter to the full date range, which the user can select.
Using two bookmarks one to clear the data range and one to show the last two months. You can layer the bookmarks and control the visuality, and even the slicer type if required.

Related

Looking for results between selected dates and before in power bi

I have a dashboard with two slicers. First slicer is selecting stages of building homes ( trench, frame, roof etc) second slicer is end date time. Both slicers are using the fields exist in the same table. Users want to select two stages lets say stageA and stageB, and the date selection is 12/1/2022 to 1/1/2023 now we have stages with end date time in a table view. In the future users want to see even if latest stage is within the date slicer it doesnt matter even if the earlier stage is within the date slicer or "before" they want to see it SO THAT they can look at these two date's variance! Any help would be appreciated. Thanks !
I have been looking online for one week, couldn't find any solution

How do I create a slicer that only affects one column in Power BI?

I have a table with multiple columns, I would like to add a "Previous Date Slicer" so that there is a column that will fetch data from previous dates that the user selects, but it applies this slicer to the entire table so I can't actually create a comparative column and the entire table is filled with data from the dates I have selected.
The intent is that the Previous Data Column will display the information from the previous dates I selected in the slicer column, creating a comparison. One column will have the current dates data, and the other column will have the previous dates data from dates the user specified.
you should be able to do this by "Edit Interactions" feature.
When you have the slicer highlighted you will see a "Format" pane in the top many and the first button on this page is the one you want. One you enabled "Edit Interactions" some extra icons will apear on the other objects and all object is by default set to filter. You can change the object you don't want to be filtered by the slicer to "None"

Set default date range for 2 years in power bi date slicer

I have a dataset which is containing data from 2015 to latest and dataset is refreshing on daily basis. So I need to set default start date and end date for 2 years from latest date as by default. But User can also see the previous data by changing the date selection. How can I set the default date range for last 2 years including today?
We can easily perform day, month, year filtering with the slicer option we have selected from the visualisation section.
enter image description here
In the dateadded slicer that we see in the image, we can perform the filtering process we want from the options located in the upper right corner.

how to set current quarter in Superset?

I want to set current quarter dynamically, e.g [2021-01-01 ~ 2021-04-01)
Does superset support it? if so how to config it?
The Last vs Previous and date range control in general has been a source of confusion for my users.
Last Quarter just shows the last 3 months [because it's a quarter of a year?].
It would be great to have options like Week to date, Month/Period to date, Quarter to date, etc...
Another issue is that each company may define their quarters/periods on different starting dates, depending on their fiscal calendar.
As a stop-gap, I've done the following.
enriched the underlying dataset to have additional columns like period_start_date and fiscal_quarter_start_date.
created a fiscal_dates table that contains a list of every day over the years I need to query. The columns correlate with date columns in my other tables, like dob, fiscal_week_start_date, period_start_date, fiscal_quarter_start_date . I created this table in postgres using generate series
created a new virtual dataset that contains the column period_start_date, that shows the last 4 years of period start dates.
use a value native filter to select from the list of dates.
make the values sorted descending, and default value as "first item in list".
This allows the user to select all records that occur in the same quarter/period, with a default of the current quarter.
The tentative apache/superset#17416 pull request should remedy this problem, i.e., for the QTD you would simply specify the START as datetrunc(datetime("now"), quarter) and leave the END undefined.

Creating Date Relationship in Power BI for Slicers

I'd like to slice across visuals based on dates in MS Power BI (i.e., one filter for say month will slice all visuals for that time period.
I created a date table from http://www.agilebi.com.au/power-bi-date-dimension/ to link to the date columns in each table.
I connected xlsx workbook.
Image of columns in Power BI
I added tried to edit the relationship so connect the 2 date columns. However, when I insert the filter using the date_table as values and try to use it, the visuals disappear.
Visuals are Gone
However, when I create the slicer and slice across multiple visuals, they go blank.
**I tried changing the type to "Both" but it didn't fix the problem.
The script at AgileBI.com.au creates a date table with a 'Date' field that has a data type of text. You can (surprisingly) do a relationship between 2 fields of different data types and not get an error. However, a join between a text field that contains dates, and a regular date field will mean that rows that look like they should match up do not.
You can confirm this is happening by picking a value in the 2 tables that you think should match up and seeing if they are identical. In my case, I had Tuesday, November 01, 2016 in my imported table, and 11/1/2016 in the other table. While they both represent the same date (in the US), they clearly look different. A good place to see this is in the Edit Relationship screen (and it definitely would have been helpful to include a screenshot of that in your original post).
Anyway, if the dates in your table don't match up to the corresponding (text) dates in the Date table, then when you filter to "2016" on your slicer, the visuals will all go blank.
I would recommend:
Click Edit Queries
On the left hand side, select the table of dates (called Invoked Function by the script)
Click on the header for the Date column (it will likely already be selected)
Select Transform on the ribbon
Change the Data Type from Any to Date
Click Home > Close & Apply
Hope this helps.