Power BI not displaying full data - sql

I use DB visualizer to execute queries and get results from an oracle database, and I use Microsoft Power BI to display the results. On August 20, 2018 I updated Power BI and installed the latest version and since that time, the results in the Power BI query editor is not the same as the results in the Database.
I have a table with 8 columns, 7 of type string and one of type Timestamp and here's an example picture of the resulted query
And when running the same query in Power BI the result is not the same
Do you guys know anything or a way of fixing this issue? if you need more info please let me know

Related

IBM SPSS How to import a Custom SQL Database Query

I am looking to see if the capability is there to have a custom SSMS sql query imported in SPSS (Statistical Package for the Social Sciences). I would want to build syntax that generates this query as my new dataset that I can then continue my scripted analysis. I see the basic query capability of one table from a Sql Server but I would like to create a query that joins to many tables. I anticipate the query to be a bit complex with many joins and perhaps data transformations.
Has anybody had experience or a solution to this situation?
I know I could take the query and make a table of it that SPSS can then connect to but my data changes daily and I would need a job in another application to refresh this table before my SPSS syntax would pull it and I would like to eliminate that first step by just having the query that grabs the data at the beginning of my syntax.
Ultimately I am looking to build out my SPSS syntax and schedule it in the Production Facility to run daily.

Dynamic generation of SQL statement for Power BI Desktop ODBC data source (triggered by refresh-on-open or by button)?

Is there mechanism for online generation of SQL statement for Microsoft Power BI Desktop ODBC data source? I.d. maybe Power BI has some events attached to the datasource, e.g. beforeOpen, beforeRefresh and I can write Visual Basic VBA (DAX? M?) code in the handlers of those event and with this code I can modify the SQL statement?
My question is connected with How to use parameters (e.g. for Firebird) in the SQL statement (optional) that defines ODBC data source for Power BI Desktop - it is quite hard to ignite use of parameters with ODBC and Firebird and hence it is my thought to avoid parameters at all and istead generate SQL code completely and then this code-generating VB code can read parameters (current date, from user input) and adjust generted SQL accordingly.
Additional Information I can import data from the static query and then Power BI created query components in the Model pane. When I choose 'Edit Query' menu item/command, then the Power Query editor opens and I have the opportunity to update the M code which is:
= Odbc.Query("dsn=MY_ODBC_SOURCE", "select s.sale_date, s.amount from sales s where s.sale_date>='01.07.2021'")
I can edit there the sale date parameter and refresh query data.
So, my question boils down to the other question: can I create button in Power BI, that does those 2 things: 1) programmatically edit the Odbc.Query("") source code (by passing parameter values from the controls of the Power BI form); 2) programmatically refresh data?
Additional information Article https://powerbi.microsoft.com/en-us/blog/deep-dive-into-query-parameters-and-power-bi-templates/ details the definition of Power BI parameters. Maybe those parameters can be accessed from the DAX/M expressions that define ODBC query/data source and that can be edited from the Power Query Editor? Those parameters can simple numerical values, but maybe whole parts of custom SQL can be encoded by such parameters or derivations. Currently, though, I don't see how to use Parameters in Power Query.
The overwhelming majority of PowerBI reports would simply import all the data and filter/sort it once it's loaded into the DataSet.
You can manipulate the SQL statement in M by creating a Power Query Parameter, and pasting the parameter value into your SQL statement.
But you must refresh the Data Set for any change in the parameter value to take effect, as the SQL Query only runs during a data refresh. That's why the normal practice is to import all the data and filter it in the DataSet.
You can interactively filter the source data if your Data Set is in DirectQuery mode, but you have to be using a data source that supports DirectQuery.

How "CREATE VIEW" works?

I'm a newbie in here. I had a problem that need your help.
Here is my context: I have 1 table that contains 100 mil data rows. I need to build reports from this table. I use Power BI, using direct import, and write SQL statements in Power BI. When the data loaded to Power BI, it reduced to 20 mil rows (cause I used GROUP BY in SQL statement). But the performance of Power BI is really terrible. In my opinion, Power BI had to run the query statement, and then visualize data, so its performance is bad.
Here is my solution: I'm going to CREATE VIEW (using GROUP BY statement) in my database. So that, the run query workload is no longer belongs to Power BI. My database will take responsibility for the executive SQL statement. And Power BI just only need to visualize data, so the performance of Power BI will be better.
Here are my questions:
1 - Does my solution work? :)))
2 - IF my solution work, my database just needs 1 time in running CREATE VIEW statement, and no need to run it anymore in the future, right?
3- If my solution work, the SQL running workload will move from Power BI to my database, right?
Thank you in advance.
When you use Import mode, then your Database is query once (at refresh time), but the view still need to make aggregation and there is no difference between select from view vs select with the group by (the view is only a nice packed query, better to materialize view or populate standard Table with the daily job);
It's a good idea to remove unused columns and rows, older than X (also aggregate if possible).
Consider using Incremental refresh to shorted your load.
https://learn.microsoft.com/en-us/power-bi/connect-data/incremental-refresh-overview
Incremental refresh is supported for Power BI Premium, Premium per user, Power BI Pro, and Power BI Embedded datasets.
I have no idea about powerBI but if you use view it executes the query in view every call. You can try materialized view instead of view. But be aware materialized view has the snapshot of data when it created or refresed time.
as an example the view MY_MATERIALIZED_VIEW is refreshing every day.
create materialized view MY_MATERIALIZED_VIEW
build immediate
refresh force
on demand
start with sysdate next sysdate + 1
as
....query

Convert Mdx Query to Sql Query in Java

My current system supports Sql Query. We are integrating our application with another application which generates the Mdx query from UI based on user selection. During the integration, we need to process this Mdx query and convert into Sql query so that we can use existing api to execute and process the query results.
I am looking for an api which converts Mdx query to Sql query.
Appreciate your help on providing details on this.

SQL Server Data Tools 2010 Measures Grid Values Not Showing

I'm developing a BISM Tabular Model in SQL Server Analysis Services (SP1). The tool I'm using is SQL Server Data Tools 2010 (the 2012 Version doesn't exist / work yet). My data source is a SQL Server 2012 SP1 Relational Instance
In the measures grid the results of the DAX expressions, i.e. the Measure's value, are now not being displayed. They did before. I'm not sure what I did.
An example. Say create a measure using DAX like:
Users:=DISTINCTCOUNT(UserId) // Say I have 50 UserIds
The measures grid should display
Users: 50
But it just displays:
Users
It doesn't appear to affect other any other functionality
Any Ideas? Thanks