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.
Related
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
Two-line graph with slicers: Everything looks fine until date selections are made.
I figure that this failure has something to do with the line graph and date functionality. Date selections work together in a very weird way. Selecting only 2019 months and then only 2020 months, both lines disappear.
If the date slicers are going to work together, I should expect inclusive behavior, rather than "NOT 2020 AND NOT 2019"!
See relationships.
How do I get the behavior intended on one two-line graph?
Thanks!
I agree with #teylyn, sometimes less is more.
The problem is how Power Bi works and how your measures are calculated. You have two averagex-measures, both pointing to same date table. In Power BI, two separate filters from a single dimension can't do "union", they are laid down on top of each other. You are telling that first I want to filter by 2019 November and after the filter has been evaluated, you tell that you want to filter 2020 January. Power BI adds new filter to already filtered dataset, but the dataset doesn't contain anything that match both filters, so the end result is empty.
One way to get around this problem is to create separate date-tables for filtering purposes for blue and green. Here is an example of the data model needed:
Then you update the date-filters in second tab. Set blue date filter to one date-dimension and green date filter to another. This way they aren't filtering the same table and the graph should work the same as before.
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
Using PowerBI desktop, I have created a small table (called TimeSelector), with three elements: Day, Week and Month
The idea is to use the content of this table to create a slicer with three options
Thus, selecting one of those options should change the way dates are used in tables.
For instance, selecting Day would result in the following table:
While selecting Week would result in this:
Etc..
I have tried to write a new measure taking in account the selected slicer element, but it is not working:
DayWeekMonthSelection = IF(CONTAINS(TimeSelector;TimeSelector[DayWeekMonth];"Month");
MONTH(VALUES('uptime_downtime'[Uptime_date])))
This is only the first part of the formula, only testing the month option as a start.
Any idea on how to do this?
To offer another perspective:
The approach I take with this is to have a separate table in the database - containing meta data about the date, called date_lookup.
2 of the fields in this table are FirstDateOfMonth & FirstDateOfWeek.
Some of the other fields are lastDateOfMonth & LastDateOfWeek, also DayOfWeek.
By using these fields I can easily present visuals that are grouped by month or week.
Sure you can use functions to get this information, but functions can be platform dependant. If you're making a join to the date_lookup anyway - it's no more effort to get this info from there...
The main reason we need to store this meta data is our company Financial year is Jul - Jun. Therefore we need to have available the Correct FY - which is stored as a field in the date_lookup table. I also have fields in there identifying public holidays...
This is an interesting question, but I'm not sure how to do exactly what you are asking for, so I'll suggest an alternative. (Changing a measure based on a slicer selection isn't too difficult, but I'm not sure a good way to swap out a field/dimension.)
Instead of creating a separate table for your slicers, a different possible approach would be to create a date hierarchy. Often when you drag a date column into the rows or columns box it will automatically create a date hierarchy with Year/Quarter/Month/Date, but since you want week and not quarter, let's create one manually.
First, create a couple calculated columns for week and month. For example:
Month = FORMAT(uptime_downtime[Date], "mmm")
Week = WEEKNUM(uptime_downtime[Date])
Now right-click on the date on the fields, and choose New Hierarchy. It should look like this now:
Now drag the Month and Week columns onto Date Hierarchy and then rearrange them in the appropriate order:
Now you can use that hierarchy in a matrix and use the drill up and down buttons
to get the different groupings:
I would like to get count of order number and I have multiple slicers which would slice down the value . for one calculation .I would need to ignore all the other slicers except date slicer and get the count of orders.could you please help.
If you want to ignore all the slicers, you can create a measure using the DAX function ALL. And if you want to ignore all the slicers except one, you can use ALLEXCEPT. Those two function will calculate your count based on all the values.
If you have a visual that only shows the count you are referring to, there is another way. You can stop slicers from interacting with the visual you want your count to appear on. So, you can select the slicer, go to Format and the click Edit Interactions and clik the circle (None interaction). Do the same for all slicers you don't want to affect the visual with your count.