Apply filter before query editor steps

313 Views Asked by At

I have the following scenario. My datasource looks like this:

Order Item Type  Value
  1    1    A    14
  1    1    B    10
  1    1    C    12
  1    2    A    12
  2    1    C    19
  2    1    D    15
  2    2    B    11

Now I apply a few steps in the query editor, inter alia, a Group By (by Order and Item), so that my finished table looks like this:

Order Item  Value
  1    1     36
  1    2     12
  2    1     34
  2    2     11

I am looking now for a possiblity to filter my datasource table before the steps are getting applied (Filter datasource > query steps getting applied > chart changes).

In my example here I would filter the datasource by Type <> B:

Order Item Type  Value
  1    1    A    14
  1    1    C    12
  1    2    A    12
  2    1    C    19
  2    1    D    15

And the final table (chart datasource) would be looking like this:

Order Item  Value
  1    1     26
  1    2     12
  2    1     34

I tried it with parameters. But the problem is I need the filter in power bi online, so that the enduser can apply this filter.

Thanks in advance for any ideas !!

2

There are 2 best solutions below

3
Olly On

Don't apply the grouping in your query. Leave the source table as it is, create a measure which sums Value, and filter Type.

1
AudioBubble On

using order and item in a table visual(don't summarise) and for value using SUM of values, which can later be filtered by type should give the desired result.