I have a data model set up in PowerBI. I have a date table that's the fact table, and numerous data tables that are dimension tables.
Here is a picture of the data model. They are all connected Date[Date] <--> Table[Timestamp].
The table in question is the bottom table, RDS-WST00X-BZF-Insolation.POA.AM
Here is the table where the issue can be seen. It's like Measured Insolation doesn't see the Date Table, even though there is a connection set up in the Data Model
Here is the measure in which Measured Insolation is calculated from the RDS-WST00X-BZF-Insolation.POA.AM table
Finally, here are screenshots of both the Date Table and the RDS-WST00X-BZF-Insolation.POA.AM table
Related
I am practicing incremental refresh with independent and merged tables scenarios.
Say I have 2 tables - Sales (SalesID, ProductID, Date, Amount) and Rate (ProductID, Date, pc%)
End goal is that the Sales table must have 5th column = Sales.Amount * Rate.pc%
Incremental load needs configuring as there is large volume of data.
Scenario 1: Independent tables
I setup incremental refresh for both tables. In Power query added an extra column (newid) to both that is concatenation of ProductID+Date. In Power BI model connected the Rate table to Sales table on the newid column. To the Sales table I have added calculated column = Amount * RELATED(Rate,pc%)
I'm monitoring queries hitting the SQL server and notice that queries are sent for both tables to update their partitions. This is as expected.
Scenario 2: Merge tables in Power Query
Scenario2.Trial 1:
I setup incremental refresh for Sales table. In Power query I have merged the Rate table on ProductID and Date to retrieve the corresponding pc% value.
Observing the SQL queries there is a query for each partition of the Sales table, and the whole rate table is pulled at each iteration of the Sales partition.
Scenario2.Trial 2:
In addition to above, I setup incremental refresh on Rate table, and observed that the above behavior is the same (that is - for each partition of Sale table, the entire rate table is fetched). Plus queries are fired for rate table separately for its partitions.
Scenario2.Trial 3:
In addition to both the above, I disabled incremental load on the rate table, but kept the range start/end parameter filters on this table. And disabled load of the rate table. Now for each incremental load partition query of the Sales table, it also applies the same date filters to the rate table.
Are there any challenges to consider when using either of the above - that is - Scenario 1 or Scenario 3.Trial 3 when performing incremental refresh when the eventual goal is to merge the tables to retrieve column value from the merged table? The negative aspect of Scenario 2 is that - after the request to each Sales table partition, it fires a request for the corresponding rate table for that date range.
I have to fetch some data from different database table and show in table view, the table view not contain all column from database but mixed from different data base table. I need to do the following.
Fetch few column from table1.
Fetch one cell from table2 and edit the data from table1(1 or 2 column).
Display the edited data on table view.
Update table1 on DB while user edit on table view.
Update table view in particular time interval.
So should I use QAbstractItemModel or SQL Model Classes like QSqlQueryModel, QSqlTableModel,QSqlRelationalTableModel .Whcih one is more suited in my scenario.
I looked in documentation but seems minimal example.
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.
I am going to use a simple scenario to simplify my question.
I have table A (1000 records). This table has 5 years worth of data
table B (1,000,000 records). This table has 20 years worth of data.
Table A also has a column containing the key to join to table B. The key is to the earliest created record from Table B.
I am using import mode to load this data. When i load both tables, it imports all the records from both tables. I am looking to only bring in the records from table B that join to table A. similar to INNER JOIN.
I tried using the merge funcionality and selecting INNER as join type. In theory, this should only retrieve 1000 records back but when the data is loaded in PowerBI, all records from both tables are loaded into PowerBI desktop.
I am trying to reduce the dataset size by only retrieving the relevant records from table B but not having any luck.
Does anyone have any suggestions?
Import Table A and Table B into the query editor, do the inner join to create a new Table C that only has the matching rows.
Then right-click the Table A and Table B and uncheck "Enable Load" so that those tables are only used as connections rather than being loaded into the data model and saved in the PBIX.
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.