Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
brst
Frequent Visitor

Slider - all elements of data used when numeric slider value get's added to dataset

Hello,

 

this is my first post in this forum - so first of all thanks for your suggestions and help 🙂

 

Short summary: filters on sheet don't apply when adding slider value to visual,  only shows with one dataset

 

My problem can be seen in the following two screenshots:

 

Power BI Dataset 1:

Example Database Sakila included with MySQL installation, PBIX attached

Sakila Database: Left: Python visual with columns replacement costs and slider value (top right), right visual: only replacement_cost columnSakila Database: Left: Python visual with columns replacement costs and slider value (top right), right visual: only replacement_cost column

 

Sakila Database: Left: Python visual with columns replacement costs and slider value (top right), right visual: only replacement_cost column included

 

Here we see the "somewhat" expected case: I expected the total amount of columns not to increase, so 21 elements for left and right plot. The replacement cost colum starts with an additional `nan` entry which is also unexpected but can be filtered out easily.

 

# code used for all visuals
import matplotlib.pyplot as plt
from pprint import pformat
plt.title(len(dataset))
plt.text(0,-.2, s=pformat(dataset.to_dict()))

plt.show()

 

The slider for this and the following file was created using a "What-If-Parameter".

 

When trying to repeat the same with my own data the addition of the slider value leads to a disregard of filters existing on the sheet and a combination.

error_filter own dataset.png

 

 

Power BI Dataset 1:

Database from local MySQL instance, unfortunately cannot share data / relations / PBIX

The "table values" column has 33 elements in total, but is currently filtered down to 17 elements through the filter in the top mid.

 

I don't understand why there aren't simpy the 17 elements of filtered "table values" with an added column of the scalar slider value - here 0.25. This is how it works for the first example I provided and how it used to work for me but I don't know whats the difference in this case / for this specific dataset. The effect occurs for several different tables in the dataset. The dataset has many relations, 1:1, 1:n but no m:n. Each of the tables has at least one relation.

The same effect shows when using another the matrix in the top left to filter the data - the amount of elements is not filtered as it should, it contains the whole "table values".

 

Why is the dataset not filtered as expected?

 

Measures already taken:

- replicated the effect among several tables / columns in the same dataset

- started with a new pbix, reloaded all data

- checked the automatically recognized relations

- make sure that interactions are enabled using "Edit interactions"

- several restarts

- replicated on another users PC

 

 

brst_1-1636532649721.png

Cutout of Sakila relationship, used column replacement cost is part of "sakila film"

5 REPLIES 5
brst
Frequent Visitor

https://we.tl/t-81RXZBkUlr

 

Here is the link to the promised sakilla Power BI file.

brst
Frequent Visitor

Hello,

 

here I added two more screenshots that hopefully help making the situation easier to understand:

 

Below we can see a screenshot of about my own dataset where the problem is visible. It consists of a slicer of the column table_values, a what if parameter "filter", another filter on the 'related column' values, a value list of all table values and the three visualizations as described above.

 

 

screenshot visuals own databasescreenshot visuals own database

The "table values" column is used in the "table values" filter on the top left. This filter correctly applies to all of the three "visualizations". When filtering with the column "related column" from another table then this filter only applied when the SELECTED VALUE of the what if parameter called "filter" is not part of the dataset (bottom mid), otherwise this filter is ignored (bottom left).

 

relation two tables own databaserelation two tables own database

v-yangliu-msft
Community Support
Community Support

Hi  @brst ,

 

This is a relational problem. It seems that there is no slicer "1" in your visual object associated with the column, resulting in no filtering between.

From the screenshot of your relationship, the relevant information of slicer "1" is not found, it is difficult to judge, whether you can provide sample data, which contains the used tables and columns, delete sensitive data.

 

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello @v-yangliu-msft

thank you for your answer.

 

If you still cannot understand - don't hesitate to question.

 

It seems like it don't understand your answer - what slicer "1" are you referring to?

Is it the "selection slicer" in my example in the top mid in the second example / my own dataset?

If so, then this is expected, as the "ER diagram" only applies to the first example, the sakilla database

 

I unfortunatelly cannot provide neither data nor the relationships for the second / own database - I hope that you can still help me / that you can still understand my problem.

 

Both examples share the same structure:

- data loaded from MySQL

- what if parameter generated by `GENERATESERIES`

- one column unrelated to what if parameter which leads to a scalar / single value with the help of SELECTEDVALUE

- three visuals

  1. consisting only of the SELECTED value, expected length 1, as it is just a single value ✓
  2. consisting only of values to be used together with SELECTED VALUE (in the first example it is called "replacement_cost" in the second example these are the "table values"), it is expected that the amount of elements is the same as when counted by power bi directly (count also part of each screenshots) ✓, visual 2 is missing for the second example, but the amount is still available through "amount of table values"
  3. combination of SELECTED value and values, it is expected that the length of the dataset is the same as the length of the dataset in visual 2 / the element count, after all only a single value is added. In the first example there is ONE element more - the NaN value, which is not a problem as it can be filtered out quickly. 

     

    I tried replicating the effect with another database - the sakilla database from the first example, but I cannot replicate the problem there.

     

     

    The screenshot from the "model" view / the "ER diagram" belong to the Sakila database.

     

    The is NO relationship between the data used for the python plot and the slicer value in BOTH examples, as the slicer value is part of a "What-if-Parameter". The slicer value is just a scalar value.

     

    What if for second example, first example is generated analogous.

    filter= GENERATESERIES(0.05, 0.7, 0.05)
    filter-Value = SELECTEDVALUE('filter'[filter], 4)

     

     

     

     

 

brst
Frequent Visitor

Forgot the attachment of the Sakila pbix, unfortunately I cannot upload it within the company proxy.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.