direct query
80 TopicsHybrid Tables in Power BI | Shabnam Watson
Hybrid Tables in Power BI Hybrid tables, a new addition to Power BI, are a game changer in that they provide the best of both worlds by allowing one table to have two storage modes at the same time! Before the introduction of Hybrid tables, each table in Power BI could only have one storage mode: Import which loaded data entirely into Power BI’s memory or DirectQuery which left data in the back-end data source. When working with near real time requirements, Power BI developers had to use tables with DirectQuery; however, DirectQuery by itself could result in less than optimum query performance for large datasets and put a burden on the backend system. Hybrid tables combine the two storage modes and therefore provide improved query performance for historical data by loading them into memory (Import) and provide near real time capability for recent data (DirectQuery). Join this session to learn about different table storage modes in Power BI including the newest Hybrid option and how to use it. Agenda: Introductions (5 mins) Presentation (55 mins) Q&A session (15 mins) About Shabnam Watson: Shabnam Watson is a Business Intelligence consultant and Microsoft Data Platform MVP with 20 years of experience developing Data Warehouse and Business Intelligence solutions. She has worked across several industries including Supply Chain, Finance, Retail, Insurance, and Health Care. Her areas of interest include Power BI, Analysis Services, Performance Tuning, PowerShell, DevOps, Azure, Natural Language Processing, and AI. Her work focus within the Microsoft BI Stack has been on Analysis Services and Power BI. She is a regular speaker and volunteer at national and local user groups and conferences. She holds a bachelor’s degree in Computer Engineering, a master’s degree in Computer Science, and a Certified Business Intelligence Professional (CBIP) certification by The Data Warehouse Institute (TDWI). This event is online. You may need to install Zoom: https://zoom.us/download Space is limited so reserve your seat. Contact with Shabnam: LinkedIn: https://www.linkedin.com/in/shabnamwatson/ www: https://shabnamwatson.wpcomstaging.com/ Twitter: shbwatson Members participating in Meetup Live events must be respectful in interactions with people and in content posted on the platform.1.3KViews0likes0CommentsEvaluation of one of the rows caused an error (desktop OK)
Hello everyone! Could I get some help with the situation bellow: I have two Power BI reports, from different data models. -On report 1, I have a table of company stock by reference, also has the last movement for each material. -On report 2, I have a table for purchase orders by material. Both reports have updated data Now, I want to know in the purchase orders table the latest movement (if the material is in the stock table. If not, blank). For that, I have created a table using SUMMARIZE that contains only the material and last movement date. The table has no errors. I am importing this table to model 2 (direct query from power bi data model). I can see in model 2 no errors related to this table. I can see the data fine both desktop and online. No repeated references. Finally, I have created a column on the purchase orders table with the date. I have tried with both LOOKUPVALUE and MAXIMUM. In both cases, it works well on the desktop and crashes online with the error: "evaluation of one of the rows caused an error", referring to this column. Because I am going crazy, I have tried to import to model 2 directly the full stock table (was avoiding to reduce storage and duplicity). I get the same error. Thank you so much in advance!Solved857Views0likes3CommentsIs it possible to use ODBC with Live(direct query with delegated user) in PBIRS
Is it possible to use ODBC with Live / DirectQuery using delegated user authentication in PBIRS? Since the ODBC connector supports Kerberos and OAuth, I’d like to know whether Power BI Report Server can leverage these authentication methods when connecting through this type of ODBC connector.Solved1.8KViews0likes5CommentsSQL Query generation in Direct Query
Hi Team, we are generating the report by connecting to Databricks as the source. The tabe volumes are running into millions. The business ask is to have filters at date and few other columns. The slicers are being used. We have to use Direct Query to fetch the data as we have the RLS enablement as well at databricks level depending on the user who uses the report. We see the query generation using "IN" clause when we give a week filter. Can't we get this as data range "BETWEEN" clause instead? This would help to optimize the query to fetch the results in better response rate. We are unable to do that switch in the queries generated in direct query Kindly helpSolved3.2KViews2likes9CommentsPower BI Report Server Direct Query from Spark and SQL Server database is not working
Hi Experts, I just tried using Power BI Desktop and get data in direct query mode from Spark/SQL Server with success. However, I uploaded the reports on my Power BI Report Server (September 2024) and tried to view the report then I get an error below. An unexpected error occurred. Please try again later. Please try again later or contact support. If you contact support, please provide these details. We couldn't connect to the Analysis Services server. Make sure you've entered the connection string correctly. Request ID940c5bbb-a284-bb98-f3f4-17230d2b7b9c TimeWed Apr 23 2025 15:25:38 GMT+0700 (Indochina Time) Service version/powerbi/libs As searched on the community and see the PBI_SQL_TRUSTED_SERVERS variable, I am configuring the value as Localhost but the issue still persists. Please help. KLSolved4.2KViews0likes12CommentsIssue Direct Query with Report
Hello Everybody, We have a PBIRS 2025-01 (Version1.22.9153.7886). I create a report with a Direct Query connection to a SQL Server 2022. There is only 3 tables without relationship All works well in Power BI Desktop for Report Server (query retrieve data and visuals works well). I deployed report on server. When I try to open the report on the Server, there is the error message : When I go to Data Source all works well : We already add a enviornment variable PBI_SQL_TRUSTED_SERVERS on PBIRS with the SQL Server Source but nothing change. Logs on PBIRS shows a szucessful connection (code 200) without any error. Somebody can help me or have an idea to investigate ? Kind Regards, ThomasSolved2.5KViews0likes9CommentsCalculation group issue PBIRS
So we recently updated our report server and desktop setup to January 2025 version and with it came a great bunch of new functionalities! As I was trying out the calculation groups functionally, I learned the hard way that it is not quite ready yet. If you have a model which is using direct query, then add a calculation group. The group automatically has storage mode "import", which makes the model a composite model. Which as far as I have understood is not supported for pbi report server(yet). So when I saved my report to the server, closed desktop and the next day tried to reopen my report I got the error message that my file is using a composite model and it's not supported in pbi report server. So I couldn't open it anymore, meaning I couldn't remove the calculation group. Meaning I had to grab an older version of my report and copy that data model into my new one and redo all of my work. I also tried opening it locally but it's the desktop version that doesn't support the model so that didn't help either. I don't have the option to open the report in a "regular" pbi desktop to fix it either. I think maybe the calculation groups option shouldn't be accessible if it basically breaks your dataset(with import data) if you are using direct query. I am not sure if this is a "bug" or if I as a user/developer should know about this but it seems to me like maybe the calculation groups setting should either be turned off or at least warn if you have a model using direct query storage mode. Petebro Let me know if there are any more specifications you need from me, but I assume this is a general thing. TLDR: PBI Report server + Direct query storage mode + adding calculation group = BadSolved1.7KViews2likes3CommentsFailed to publish Power BI Report (DirectQuery + Gateway)
The issue: 1. When I'm attempting to publish the .pbix file (data load with direct query) through the Azure DevOps pipeline, the Power BI Service returns a BadRequest error. This error occurs even after updating the SQL Server and database parameters to the client’s specified gateway-compatible values. 2. I also notice that, the .pbix still reference the on-prem servers that I used to test locally, they exist in the data models. The thing is I cannot connect to client's SQL server from my device, so PowerBI desktop throws error that wouldn't let me apply the changes, save without apply didn't work. The old connections remain in the file. I tried with one BI report, where I change all the direct query into import mode, then it works and successfully published. But I'd better keep the direct query bc in some reports the dataset can be very large. Is there any way that I can update the Sql server / database parameters withouth actually connecting? Thank you for your time and attention.Solved2.5KViews0likes7CommentsDAX Running total in Direct Query, but reset to zero each day, if running below zero
Hi Power BI Community, I have an issue, where I want to calculate a running total in a measure, so I'm able to get the primo and ultimo value of the stock quantity. This is a forecast of the stcok 14 days ahead of time, and to be sure that we won't run below zero on a given day. In the event of the running total going below zero, I need it to reset and use the 0 as the new starting point. Backstory I need to use Direct Query as the data source connection. I have therefore limitations that I cannot use a calculated column, since I cannot use CALCULATE in calculated columns due to Direct Query. I have no possibility to throw the calculation out of DAX and Measures and into Power Query, again due to Direct Query limitations. I don't have a possibility to put the calculation outside of DAX, so I need to find a solution within measures, that I can use. Where I'm at right now My data looks a bit like this: Item Date Primo Sales Purchase Ultimo 1 16-08-2024 1.429 771 0 658 1 17-08-2024 658 1136 0 -1136 1 18-08-2024 0 4 384 380 1 19-08-2024 380 594 0 -594 1 20-08-2024 0 630 0 -630 1 21-08-2024 0 659 0 -659 1 22-08-2024 0 821 0 -821 1 23-08-2024 0 167 0 -167 1 24-08-2024 0 4 0 -4 1 25-08-2024 0 3 0 -3 1 26-08-2024 0 0 0 0 1 27-08-2024 0 0 0 0 1 28-08-2024 0 0 0 0 1 29-08-2024 0 0 0 0 I have tried to put everything into my ultimo calculation, but I can also see that that is the source of the error. I have 3 measures that's just a sum of the data in the table: WarehouseflowSales = SUM(warehouseflow[sales]) WarehouseflowPurchase = SUM(warehouseflow[purchase]) WarehouseflowInventory = SUM(warehouseflow[inventory]) Then I have the measure for the Ultimo column: WarehouseflowUltimo = VAR MaxDate = MAX(warehouseflow[date]) VAR UltimoYesterday = CALCULATE( -[WarehouseflowSales] + [WarehouseflowPurchase], ALLEXCEPT(warehouseflow, warehouseflow[itemno]), warehouseflow[date] < MaxDate ) + [WarehouseflowInventory] RETURN IF( UltimoYesterday < 0, 0, UltimoYesterday + [WarehouseflowPurchase] - [WarehouseflowSales] ) The measure for the Primo column is just the ultimo value from the day before: WarehouseflowPrimo = VAR MaxDate = MAX(warehouseflow[date]) VAR UltimoYesterday = CALCULATE( [WarehouseflowUltimo], ALLEXCEPT(warehouseflow, warehouseflow[itemno]), warehouseflow[date] = MaxDate - 1 ) RETURN IF( MaxDate = TODAY(), [LagerflowInventory], IF( UltimoYesterday < 0, 0, UltimoYesterday ) ) I have tried to edit the measure to use a somewhat circular reference, but whereas I handle the calculation for the WarehouseflowUltimo measure by date. Meaning that if the the date is today, then I should add the WarehouseflowPurchase and subtract the WarehouseflowSales to the WarehouseflowInventory. If it is not today, then I should use the WarehouseflowPrimo instead of the WarehouseflowInventory. Do you have any suggestions as to how I can handle this? Possible solution I can see myself I have thought of a solution to create 14 different measures, since I need to handle 14 days within my forecast. Then I should be able to handle the issue day by day. I'm just a bit tied on hands and legs due to performance on this issue as well. I haven't tried it yet, but would like to hear your suggestions first 😊Solved1.9KViews0likes5CommentsDistinct count total is correct, but the columns are not
Hi, I am new to power BI and need some help. I have a list of patient IDs and I want to get the total distinct patients per fiscal year broken down by fiscal period, but when I put it in a table with columns representing the periods, it gives me the distinct total per period not per year, which is not what I want. Only the grand total in the table is correct. e.g. Here is what I'm getting for 2023 (using a slicer): Here's what I want: Again, to clarify, each patient should only be counted once per year, and should only be counted in the first period they appear. In my dates table, I have per row every date from 2022-2025 (Jour"), and the corresponding fiscal period (P#) and fiscal year (Annee 2). In my patient data table, the relevent columns would be the patient ID and appointment date (startdatetime). I have done a lot of research and none of what I've read is giving me the correct results. I can acheive the results when working with imported data, but I need to keep it as direct query so my options are more limited. I would appreciate any help you can give!Solved2.2KViews0likes8Comments