data protection
329 TopicsWeb.Contents failed to get contents from 'https://ausreman.tidywork.com/api/materials' (400)
I have tried a number of scenarios for posting data, but I have come up with nothing. I am trying to write a power query that posts data to a REST API (https://ausreman.tidywork.com/api/materials), it posts data for materials. The current query I have is: = Json.Document(Web.Contents("https://ausreman.tidywork.com/api/materials",[Headers= [#"Authorization"="Basic ZZZZZZZZZZZZZZZZZ",#"Content-Type"="application/json"], Content=Json.FromValue({[projectId="65b6d1fe-ec2e-47c3-9c92-2aad8fdd1d26",userId="67220adb-d5cb-4667-a3ce-ebe3d6248334",materialDateUtc="2015-09-14T07:11:00",materialDate="2015-09-14T17:11:00",materialId="00000000-0000-0000-0000-000000000000",materialLocationId="1aeb9552-a3e9-4804-a7b2-641b290dac8d",materialItemCode="1H3338",materialItemId="f9be8264-81f0-4ae2-a12b-569b3e05d034",costCurrencyId="17709522-6b2e-4b01-9cdf-bb7eb0a43c52",chargeCurrencyId="17709522-6b2e-4b01-9cdf-bb7eb0a43c52",taskId="b2ffc2cf-326a-fc91-eb40-c4ddb4147a35",state="Approved",usageQuantity=1,quantity=1,cost=0.21,charge=0.25]})]), 1252) The only thoughts I had was that it had something along the lines of the size of the data being post. Please help me remove this frustration.889Views0likes4CommentsBest Practice for Calling a REST API with Username/Password Authentication Without Storing Credentia
Hi everyone, I'm currently building a Power BI report for a customer that needs to retrieve data from a REST API. The API provider has created a dedicated user account for me (username + password). My current approach is to use a Power Query function to authenticate against the API, retrieve a bearer token, and then use that token to request the actual data. Technically, this works without any issues. The problem is that the username and password have to be hardcoded in the Power Query function, which obviously isn't a secure solution. To make my question easier to understand, I recreated the entire process using the public DummyJSON API. The documentation can be found here: https://dummyjson.com/ First, I use a custom Power Query function (fnGetAccessToken) to obtain a bearer token. The authentication endpoint is documented here: https://dummyjson.com/docs/auth As you can see, the username and password are embedded directly in the source code (these are only demo credentials provided by the sample API, not production credentials): () => let // Get Bearer Token via username & password... TokenRequest = Web.Contents( "https://dummyjson.com/auth/login", [ Headers = [ #"Content-Type" = "application/json" ], Content = Json.FromValue([ username ="emilys", password = "emilyspass" // password exposed in source code 😞 ]) ] ), accessToken = Json.Document(TokenRequest)[accessToken] in accessToken I then use the generated bearer token to retrieve the actual data (in this example, the products endpoint, documented here: https://dummyjson.com/auth/product😞 let // Get access token via function... accessToken = fnGetAccessToken(), // Call REST API Source = Web.Contents( "https://dummyjson.com/auth/product?limit=0", [ Headers = [ Authorization = "Bearer " & accessToken ] ] ), Data = Json.Document(Source), products = Data[products], #"Converted to Table" = Table.FromList(products, Splitter.SplitByNothing(), null, null, ExtraValues.Error), #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"id", "title", "description", "category", "price", "discountPercentage", "rating", "stock", "tags", "brand", "sku", "weight", "dimensions", "warrantyInformation", "shippingInformation", "availabilityStatus", "reviews", "returnPolicy", "minimumOrderQuantity", "meta", "images", "thumbnail"}, {"id", "title", "description", "category", "price", "discountPercentage", "rating", "stock", "tags", "brand", "sku", "weight", "dimensions", "warrantyInformation", "shippingInformation", "availabilityStatus", "reviews", "returnPolicy", "minimumOrderQuantity", "meta", "images", "thumbnail"}) in #"Expanded Column1" For both endpoints (https://dummyjson.com/auth/login and https://dummyjson.com/auth/product), the authentication method configured in Data Source Settings is Anonymous. My question is: What is considered the recommended or best-practice approach for this scenario? I need to keep the authentication flow (username/password → bearer token → API request), but I don't want to store sensitive credentials directly in the Power Query source code. I've been wondering whether the solution involves an Azure App Registration together with Azure Key Vault. However, I'm not sure whether that approach is even appropriate for a third-party API, or how such an API would fit into an Azure App Registration. Is there a more common or simpler approach that I'm overlooking? I'd appreciate any guidance or recommendations. Thanks in advance!Solved477Views0likes2CommentsPower BI: Model is not working as expected
Problem: I am building a Power BI semantic model (Fabric) to report Actual vs Budget across a hierarchy Level 1 → Level 2 → Level 3 → Level 4. Actuals exist at Level 4 (Level 1–4 columns) Budget exists only at Level 3 (Level 1–3 columns) Expected: In a single Matrix visual, I should be able to place the hierarchy (Level 1–4) on rows and show: Actual Amount (USD) Budget 2026 Both measures should filter correctly when I select any level (Level1/Level2/Level3/Level4) via slicers or drilldown. Actual result: After normalizing into dimension tables and fact tables, the model still behaves incorrectly: Budget does not filter correctly when Level 4 is on rows (Budget repeats or behaves like “not filtered” in some contexts). Actual amounts also filter inconsistently in some scenarios (some hierarchy combinations disappear when measures are added). I need help identifying the exact modeling issue and the best production approach when Budget exists only up to Level 3 but reporting needs to work down to Level 4. What I’m looking for in the answer Exact explanation of why filter context is not reaching FactBudget at Level 4 Recommended final schema (star/snowflake/bridge) with relationship directions and cardinality Any required DAX patterns (example measure) that are production-safe Guidance on handling Budget at Level 3 while reporting down to Level 4 in the same matrix Thanks you.Solved665Views0likes4CommentsAgregate table data on app server or inside power bi
We have an ERP system and each module has many data tables, reference tables with codes and lookup values etc. I have been creating SQL database views for users to access (via XL) entire raw data sets of infrastructure assets combining asset details, financial data, etc. SQL database views can include between 12 to 20 different tables and other views. For data slicing in XL it is very convenient and practical for users. My question is from a PowerBI dashboard perspective would it be better design and 'optimisation' to have star models in Power BI, or accessing the aggregated database views from the ERP database server or create semantic models on the PowerBi server or ... Any recommendation or pointer to best practice guidelines would be much appreciated. Thank youSolved509Views2likes2CommentsRolling 4 hours average
Hi Experts, Add one more column "Rolling 4 hours Average", it has to map current row MIPS value + previous 3 , then divided by 4. we have a slicers to filter by region, by month, by date. after this "Rolling 4 hours Average" created, we have to calculate MAX MIPS value without 4 hours rolling by Month and MAX MIPS value with 4 hours rolling by month. I have tried the below DAX by result is not as expected. Rolling 4h Avg (strict ÷ 4) = VAR RelationDistinct = SUMMARIZE ( ALLSELECTED ( 'VW_MF_TRANSACTIONS' ), 'VW_MF_TRANSACTIONS'[LPAR], 'VW_MF_TRANSACTIONS'[MetricDateTime_1] ) VAR W = WINDOW ( -3, 0, RelationDistinct, ORDERBY ( 'VW_MF_TRANSACTIONS'[MetricDateTime_1], ASC ), PARTITIONBY ( 'VW_MF_TRANSACTIONS'[LPAR] ) ) VAR Sum4 = SUMX ( W, [MAX MIPS]) RETURN DIVIDE ( Sum4, 4 ) Please help to fix this asap. Thanks DK1.1KViews0likes5CommentsHow to programmatically publish Power BI / Power Query Dataflows after deployment (CI/CD scenario)?
Hi all, We are working on implementing CI/CD for Power Platform / Power BI across multiple environments (Dev → UAT → Prod), and we’ve run into a blocker related to publishing dataflows. 🔹 Context: We deploy solutions and artifacts using Azure DevOps pipelines Dataflows are successfully deployed to the target environment However, they remain in an unpublished state until manually opened and published in the UI 🔹 Issue: We are unable to find any supported way to programmatically trigger the “Publish” action for dataflows. 🔹 What we’ve tried: Power Platform CLI (pac) Power BI REST APIs Power Automate (cloud flows) Power Automate Desktop (UI automation approach — not ideal for enterprise pipelines) 🔹 Current limitation: There does not appear to be a supported API to: Publish Dataflow (equivalent to clicking "Publish" in UI) 🔹 Questions: Is there any supported API or mechanism to publish dataflows programmatically? Are there any recommended enterprise patterns for handling this in CI/CD? Is this capability on Microsoft’s roadmap (e.g., Fabric / Dataflow Gen2)? 🔹 Current workaround: We are currently considering: Manual publish step post-deployment Raising a Microsoft support ticket for confirmation #power-bi #dataflows #power-platform #ci-cd #azure-devops #fabric1.5KViews0likes8CommentsPredictive analytics solution
hi all, I am here looking for Predictive analytics solution for organization. I also searched this on many different website and found many solutions. We are bit confused to which one to choose. One of my friend suggest me this platform, and i am hoping i will get the solution from here. So can anyone please suggest the good solution platform?Solved717Views0likes3CommentsSnowflake Dynamic M Query Parameter: "Query is too complicated to run" with 500+ items
Hello, I am encountering a critical issue with Dynamic M Query Parameters and Snowflake connectivity in Power BI Desktop. Scenario: DataSource: Snowflake (DirectQuery). Feature: A Mass Filter Slicer is bound to a List-type Parameter (PartNumber). Implementation: The parameter is used within a Value.NativeQuery block to filter a large fact table. The Problem: When users select a small number of items, the query folds and performs perfectly. However, once the selection exceeds ~400-500 items, the visual fails with the error: "This query is too complicated to run" Observations: I have confirmed that the SQL generated by the parameter creates a massive IN ('P1', 'P2'...) clause. I have tried using Text.Combine and Snowflake’s FLATTEN(SPLIT()) functions to pass the list as a single string, but I still hit complexity limits. Turning off EnableFolding is not an option as the base table contains millions of rows and causes a timeout. Question: Is there a known character limit for literal strings passed via Dynamic M Parameters in the Snowflake connector? Are there recommended patterns for "Semi-Joins" that maintain folding without bloating the Native Query SQL string? @#Snowflake, #DynamicMParameters, #QueryFolding, and #NativeQuery Any guidance from the community or the PG (Product Group) would be greatly appreciated.1.1KViews0likes5Comments