How to use a single slicer to manipulate multiple plots in PowerBI - powerbi

I have multiple tables, all having one common column like:
Table1 => datetime, val1; Table2 => datetime, val2...
I have multiple plots on my page using these tables, and dont want to make changes to my tables
I want to create a single slicer to manipulate all these plots on the page. How do I do this in PowerBI
And also, how to do the same using a common filter.

When you add the slicer to the page, it will automatically apply to all visuals on that page, IF the slicer has a logical connection to the data.
If you have different fact tables that all have a datetime column with the same name, then you may need to build a calendar table that has all the dates and create relationships between the different fact tables and the calendar table.
You can then use a slicer with the calendar table date field. Since there is a relationship between your fact tables and the calendar table, the slicer on the calendar date will then also filter the visuals that pull data from the fact tables.
If with "common filter" you are referring to a page filter, again, you can use the calendar table date to filter the related data from the fact tables.

Related

Slicer with values from 3 different tables

I use Power BI Desktop with SQL Direct Query.
Here I have 3 tables which all contains a Country column.
I have an additional table which contains all possible country entries. Relation to the other 3 tables is created. Relations.
Via a slicer I wanna select the countries of interest (country values of the 3 tables), but I have no clue how I can create that?
I already create a measure to get a merged list of the 3 tables Measure. But I can't use that for the slicer.
Any ideas?

Filter multiple columns using single slicer in power bi

I am new in power bi. I am creating a basic tabular report in power bi. But the catch is I have multiple dates columns in the dataset (For Eg. productvalidfrom,productvalidto,ordervalidfrom,ordervalidto). And I want to filter these columns with a single date selection.
If I select 2021-09-01 then condition for filter will be
2021-09-01>=productvalidfrom and 2021-09-01<productvalidto and 2021-09-01>=ordervalidfrom and 2021-09-01<ordervalidto
and need to all the columns from the dataset. No summarization.
Thanks in advance.
I have been able to implement this before. You will need to add a data table to your data sources. Then you will want to create relationships between the dates in your data and the date table. Only one of them will be active relationships, the rest will be inactive. Then, your slicer will use the date from your newly created date table.
This link should be able to guide you through the build.

Dynamic Column Values in Power BI

I have the below sample table and I want to make a filter where If I select Daily, to show the aggregated sales on a daily level with the days in the column headers, if I select monthly to show the months in columns and the aggregated sales for the month below and the same with week.
Is there any way using Dax or any other tool in PBI to allow me to have dynamic column values based on the filter?
Examples of same table and visuals below
Thank you
Sample Table
Monthly Filter
Weekly Filter
You can leverage time-intelligence hierarchy here. If your date field is datetime type, Power BI will auto-hierarchy this. Then you can drag the hierarchy date field into the visualization. By default it will include Year, Quarter, Month, Day.
You can remove the sections you don't need and then create bookmarks to snapshot certain filters.
This is one method to do this, let me know if it was helpful to get you going.

Filter two tables using the same filter in powerbi

I have two tables showing country data in PowerBI, one table contains sales data in different countries and another shows stats about each country. I then have a dashboard that has a chart from each table. I want a single filter that filters on the country column in both tables.
i.e. If I filter on the US, I will get a chart showing sales data in the US and a chart showing other stats about the US.
The country columns have duplicate values in both tables so doing a relationship between them is difficult. Moreover the tables are not really related to each other as such, I just to filter the data in both so my dashboard updates both charts. Any help?
Create a table that just has the list of unique countries and make a relationship from that table to both other tables. Then use that table for your filter, rather than the country column of either of the two original tables.

Why does Power BI Preview have an issue creating visualizations for my date table?

I have an Azure SQL database with several tables, including a Date dimension (D_Date). When I connect to it from PowerBI.com and then try to create some simple visualizations, I get the error "We couldn't retrieve the data for this visualization" every time I use a field from D_Date. I have foreign keys set up in the database for relationships and I can successfully use fields from other tables and it recognizes the relationship. Has anyone else gotten this error? I don't know if it has anything to do with my table being a Date table or not. Unlike in Excel, I can't do "Mark as Date table."
Got this to work by changing the data type in the database for the FullDate field to be of type DateTime instead of Date. The FullDate field was the unique date field on the date dimension (I also have a date key of type integer). Not sure if this is a bug or what.