[Solved] PowerBI filter table based on value of measure_A OR measure_B

EverSQL Database Performance Knowledge Base

PowerBI filter table based on value of measure_A OR measure_B

I need to show in table in PowerBI filtered results based on value of one measure > 30 OR value of other measure > 50 and have no clue how can I do it.

To explain it simple:

SELECT * FROM PRODUCTS WHERE "Parameter1">30 OR "Parameter2">50

But how to implement something like this in PowerBI.

How to optimize this SQL query?

The following recommendations will help you in your SQL tuning process.
You'll find 3 sections below:

  1. Description of the steps you can take to speed up the query.
  2. The optimal indexes for this query, which you can copy and create in your database.
  3. An automatically re-written query you can copy and execute in your database.
The optimization process and recommendations:
  1. Avoid Selecting Unnecessary Columns (query line: 2): Avoid selecting all columns with the '*' wildcard, unless you intend to use them all. Selecting redundant columns may result in unnecessary performance degradation.
The optimized query:
SELECT
        * 
    FROM
        PRODUCTS 
    WHERE
        'Parameter1' > 30 
        OR 'Parameter2' > 50

Related Articles



* original question posted on StackOverflow here.