Detecting and clearing custom visual filters in Power BI

Currently, I am developing a unique visual on Microsoft Power BI using d3.js.

This customized visual includes a filter effect where selecting filters changes the style properties and adds new items.

However, one issue in Power BI is the inability to detect if filters are applied when the page/visual is loaded and the challenge of retrieving non-filtered data with filters applied.

Does anyone know of a solution to detect filters and access the original data even with filters active?

Thank you

Answer №1

After diving deep into the PowerBI report page, I stumbled upon this helpful information.

If you need to access the filters on the report page, you can do so using JS or JQuery directly from the console:

document.getElementsByClassName("ng-not-empty item-fill")

or

$("input.ng-not-empty.item-fill")

However, in Power BI, each visual is contained within an embedded frame, making it tricky to access the parent document from the embedded one. If there was a way to overcome this hurdle and access the parent, it would certainly solve the problem!

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Spreadsheet Layout for my asp.net program

Is there a more efficient tool available for integrating Excel Grid into my asp.net application? I am looking for a tool that will allow me to edit columns similar to Excel and paste data directly into the grid. It should have the same features as Excel. ...

The error message thrown is "Uncaught TypeError: Unable to access properties from an undefined variable (reading 'length')"

I am encountering a common error in my React app - "Uncaught TypeError: Cannot read properties of undefined (reading 'length')". How can I resolve this issue? Below is the code snippet in question: import React from "react"; import { Gr ...

Leverage Jquery within the div element to manipulate the data retrieved from a post ajax request

On my one.jsp page, I have the following post code: $.post("<%=request.getContextPath()%>/two.jsp", { vaedre: fullDate} ,function(result){ $("#theresult").append(result); }); This code generates the followi ...

The 'split' property is not present on the 'string | number | {}' type

Just starting out with Typescript and I've encountered an error stating that the split method does not exist on type number. I've tried narrowing down the type by checking the value's type, but so far it hasn't been successful. Below is ...

Safari having trouble auto-playing Vimeo iframe embed

Update 6/26/23: Seems like a mysterious change occurred, as now the Vimeo video on project pages is playing automatically for me in Safari without any specific reason. It's working fine on Chrome too. Not sure if Vimeo made an update or if it's r ...

Optimal method for linking jQuery ajax requests to transfer data

Handling several asynchronous ajax calls in a specific order with information passing between them can be quite challenging. The current approach, even with just three API calls, can be cumbersome. Trying to manage five API calls makes it nearly impossible ...

Issue with triggering angular function multiple times in certain conditions

Issue: Experiencing difficulties with Angular directive as it is being called multiple times, resulting in incorrect transaction outcomes and multiple entries on the Console screen. Desired Outcome: Ensure that the function executes only once. Sample cod ...

What is the best way to easily update multiple properties on objects received from an Observable?

My API is returning a large array of objects (categories), ranging from 50 to 200 categories at once. To handle this, I am creating a source observable that filters all categories into two sub-categories and presents them as separate properties within a si ...

Incorrectly modifying the _locals property while rendering a MySQL result in Express/Node.js leads to the error: "Cannot assign to read only property '_

I am currently using Handlebars to display data retrieved from a MySQL query. The route is set up as shown below: var query = "SELECT col1, col2, col3 FROM table WHERE section >= " + start + " AND section <= " + end + " ORDER BY col1 ASC"; connecti ...

Converting a String to JSON Formatting

Require assistance. I am currently working with two strings saved in separate variables; var var1 = "Myname"; var var2 = "Myage"; var jsonObj = ? console.log(jsonObj); I aim to transform the console output of "jsonObj" i ...

My goal is to create a map and store its data in an array called "rows." This array will then be utilized in a DataGrid component from material-ui

However, when I run a console.log(rows), it returns an undefined list. let rows: Array<{ id: number }> = [] rows = products?.map((product) => { id: product.product_id } ) Attempting to do it without using map does work, like so: let rows = [ ...

Checkbox ensemble computes total score

I am currently working on a project that involves multiple checkbox groups, with each group containing 3 checkboxes labeled as (1, X, 2). My goal is to assign a value of 100% to each group, distributed evenly among the checkboxes within it. The distributio ...

Unsubscribing from a socket io connection in Angular can be done

This is how I establish a connection between the client and server using socket io. export class OverviewService { socket:any; readonly uri:string='http://localhost:4000'; constructor(private http: HttpClient) { this.socket = io(t ...

Struggling to sort through an array in JavaScript and looking for some guidance

Here is the array I'm working with in JavaScript: let myArray = ["Bob", "Katy", "Bob", "Bob", "Katy"]; I am looking to filter this array by checking if the current value matches the value before or after it. I am a bit unsure on how to approach this ...

Implementing Text Box Control Validation within a Gridview using UpdatePanel in c# ASP.Net

In my gridview, one of the columns contains a Text Box Control. I am looking to validate the text entered by users as alphanumeric characters and spaces only. Allowed characters are: a-z, A-Z, 0-9, and space. I want to perform this validation using Java ...

What is the best way to incorporate a JavaScript file into TypeScript code?

I have developed a JavaScript code called carousel.js with the purpose of adding previous and next events to a carousel. How can I integrate this into my TypeScript project? Below is the render method where I have included some basic HTML markup. publi ...

Assigning a Node.js exported function to a variable

Is there a way to save an exported function as a variable without executing it right away, in order to use Promise.all? I noticed that when I assign the function to a variable, it automatically runs. How can I prevent this from happening during assignment? ...

Designing a Vue 3 JS component that showcases a collection of attributes for a movie catalog

I am aiming to utilize the movie_properties in order to store various details such as movie id, name, genre, comingSoon status, availability, thumbnail, and preview. It's important to note that I am working with an API call that contains all this inf ...

Is it necessary to use asynchronous actions in Node.js only when developing server applications?

In the Node.js application I'm developing, there is a piece of code similar to this within an async function: await a(param1); await b(param2); await c(param3); await d(param4); From my understanding, this setup works well for a server-based app. Fo ...

Effective and Sustainable Methods for Error Management in Node/Express API Endpoints

Throughout my experience with developing MEAN Stack applications and setting up APIs, I have encountered some uncertainty when it comes to handling errors within API Routes. If there are any inaccuracies in my explanation or if my concepts are flawed, ple ...