PowerBI: How to display/filter row tables between 2 years dynamically - date

I was wondering if there's a way where I can filter out my table results based on two years. My table A has date column and many miscellaneous columns. So currently I would like the table A to display January 2018 (or 1/1/2018) and December 2019 (or 12/31/2019 --basically ongoing) information. However, once January 1st, 2020 appears, I would like my table A to display row results between January 2019 and December 2020. Is there a way I can do so? Maybe in DAX or clicking some filter option? Could someone show me? I'm still fairly new to PowerBI.
Thanks

The easiest way to meet this requirement is usually using the Relative Date Slicer or Filter functionality:
https://learn.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range
Not sure if any of those options will meet your scenario. Maybe Last 12 Months (Calendar)? Your requirements description didnt make much sense to me - you probably need to explain "ongoing" and "appears".
If the Relative Date functions dont meet your needs, then you'll need to construct a column (in Power Query or DAX) that returns a static value you can use in a Slicer or Filter.

Related

Relative Date filtering Query Editor - Power BI

I don't understand the logic of Power Query Editor.
I have a big table with data from 2019 to 2024 (one column contains the monthly information).
I want to filter the data by the date of that column, but it has to be dynamic.
Two options:
The data I want to consider is "Current month -2". So all historical data minus current month.
The data I want to consider is a parameter extracted from somewhere (e.g. I set the latest month to consider manually somewhere in an Excel, which usually is "current month -1" but not always (best).
I would be happy with any of the two solutions.
Currently I found somewhere this formula which filters out vs last month:
= Table.SelectRows(#"Changed Type",each [Month]< Date.From(Date.StartOfMonth(DateTime.LocalNow())))
But somehow I do not find the way to go 2 months back.
Thanks a lot!
BR

Tableau: Sliding filter for date, but with a fixed range

I'm trying to create a sliding filter for date in Tableau, but I want the range to be fixed to one day.
For example, the whole filter scale will be from Jan 1, 2020 to December 31, 2020.
I want the viewer to be able to slide along the scale to select a specific date (e.g. June 6, 2020 - June 6, 2020), but not be able to change the size of the range to something longer than one day.
Hope that makes sense. Thanks in advance!
Sticking to filters, do you have already turned your filter data into a discrete filter (blue pill)?
If so, then you should be able to edit your filter and presenting it like a single value / slider.
If you're open to use parameter, you can right-click your date column and select Create-Parameter.
Doing so you should be getting a parameter already filled with all the dates in your column which you can then modify (if you want to get rid of some dates).
Once you show your parameter, it will appear in your worksheet/dashboard and you can edit especially in terms of how it looks like.
In your scenario, you probably want to set it as a slider:
Since the parameter alone won't filter your data, you also need to create a Calculated field with a condition.

YoY growth in Tableau

I am trying to get YoY percent growth in Tableau. I would like to see 2015 Jan Unique customers vs 2014 Jan Customers and so on and so forth till the last set of data.
When doing this in Sample super store, I get the following viz.
What I am looking is for a continuous view where the years are not broken down. Something similar to this:
Any suggestions on how I can get to the final stage.
Thanks
If you just use the year in columns, you should get the desired result (Remove the month from column). If it is still creating issues, you can create a calculated column which just has the year and use it in the visualization. The following link should guide you through the steps (Except its a bar chart, so the year would have been converted to discrete. You should be fine with continuous):
https://www.bounteous.com/insights/2015/09/17/how-make-yoy-bar-charts-tableau/
Hope this helps.

Tableau create a filter with several values in one option

I made a year over year percentage difference of some value in a pivot table. It works ugly: If Year=2018 is selected, the percentage is treaded as 100%. If I choose Year IN (2018, 2017), I can see the proper percentage diff for Year 2018 compared with 2017 treaded as 100%.
One idea I have is to create a radio filter that works like this:
If a user selects Year=2018, I want to show data for Year IN (2018, 2017). So actually two values are selected. The table pivot part with 2017 year is hidden though.
This should work for several Year options.
Is this possible?
What you are looking for are all the years whose difference to the argument is at max one year. So if you choose 2018 as argument, you want to choose 2018 and 2017 from the data, if you choose 1997 you want 1997 and 1996.
So, create a parameter [Date Argument] for your target year. Then create the condition:
DATEDIFF('year',[Date],[Date Argument]) = 0 (OR 1) and add it to the view.
However, I believe what you are trying to do could be more easily achieved using a table calculation.

I need to take out duplicates from date column in cross tab in crystal report 8.0

​In cross Tab:
One column is date. I need to show only month in following order fiscal year order:
April
May
june
July
August
September
october
november
december
january
febuary
march.
It should not be more than one time. While I am trying I am getting duplicates months in the column.
it may happen because of many causes. My opinion is, you should put some screen shot or your codes here, so it easier for experts to understand you problem.
this is what i can suggest to you
if you have many tables linked together, please double check if the link is correct or not
OR
you can select Database-->Select Distinct Record at the menu