Power BI Desktop - Relative Date Slicer Defaulting to Days - powerbi

Hoping this is a simple one to resolve.
I have a dataset, a SQL View, with the data imported into my PBIX. I have a date slicer and a number of tables, matrices and charts, over 2 pages. All update whenever I change my slicer, great.
One of my charts needs to show the last 12 months only. I choose Relative Date Filtering from the Visual level filters, select "is in the last", 12 and months from the various drop-downs. When I click Apply filter, my chart goes blank, even though there is data. When I click off the chart and back on again, the drop-down has changed to Days, not months. I have tried with various different options and always defaults back to days.
My Date field is definitely a Date. I have also tried adding a Date table and using that date too but the same thing happens.
Is it me or is there a bug?
Thanks

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 can I display months without no data?

I follow the following blog http://sqljason.com/2018/03/display-last-n-months-selected-month-using-single-date-dimension-in-powe... in order to display Display Last N Months & Selected Month using Single Date Dimension in Power BI.
I've an issue when trying to display month-year when there is no data in the fact table sales.
I did modification: https://1drv.ms/u/s!Amd7BXzYs7AVg3xJ1MKPYI_PIw3z
How to show to show for example October, november and december 2015 as an example?
I downloaded your PBIX file and looked through it.
I am unsure what you exactly want to see, because your report has a few quirks in it.
I'll try to sum them up:
You have a 'select month' drop down menu ánd a slider for selecting the number of months (As 'sales for last x months). This doesn't work. Since you now need to manually select the wanted months in the drop down menu with CTRL+Click (On each month) ánd you need to use the slider.
Next to that, your calculations seem to be wrong. If I only select Dec-16 I get 70. If I select Nov-16 and Dec-16, the sales in Dec-16 suddenly become 70 and Nov-16 takes over. If I select until July-16, July-16 gets 70 and Dec-16 gets 120.. I don't know if this is how you want it but it looks like strange behaviour.
A good tip for measures. If you sum, divide or do any calculation. End with +0. That way you wont see (Blank) but 0. E.g.
Sales (Selected Month) = SUM(Sales[Sales]) + 0
Also, you have made a small date table, which is good. But you don't use this consistently through your report. For selecting months you use the date table and for the graph you use the date in the sales table. It is better to use the date table for dates, since that is it's sole purpose.

Time slicer for different visualisations in Power BI

I want to change visualisations with a time period slicer.
This is an example of a page for a single month of data. I would like to have a time slicer that would allow me to select different months/time periods and show me the relevant data.
I thought about using buttons with bookmarks to be able to click between different months, but it is not feasible when more months come in. All the guides on the internet show how to change visualisations with time as an axis, so I don't know where to look.
Please let me know if there is a better way to do this!
In your data sources add separate column for date (or you can use existing column for that)
Next you have to create calendar from power bi or insert excel sheet, Its better to create calendar from power bi.
Then you need to make sure all the date columns are in date format. And make relationship between columns.
power bi desktop
Drag and drop created date column to the calendar column.
Then you have global slicer that affect to your selected visualization.
From slicer you can change slicer visualization as you want

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.

Sliders in POWER BI

Is it possible to create a slider in PowerBI just like we create a slider in EXCEL.If possible can someone point me to some basic tutorials for that or may e an example would really help a lot.
I think OP is referring to a slider in the context of having a slicer with variable values that can be adjusted by dragging a button of some type along a bar with beginning and ending values, such as a date. Power BI added a date slider in a recent update which is accessed by choosing the slicer visual in your screenshot and selecting a date field from the query. There is also a custom visual which allows granularity from year to quarter to month to week to day. The beginning of the fiscal year can be customized in the formatting options, so it's pretty useful if one is using Power BI in a business setting.
Unfortunately there doesn't seem to be any other type of slider available which allows the use of fields other than ones which contain date values. Even when the field is a date/time value, neither of the sliders have the ability to show hours/minutes/seconds. I was searching for one I could use with time or even on an index column when I saw this question and haven't had much luck.