Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross-filtering does not work when using fold transformation #494

Open
florjaco opened this issue Aug 28, 2024 · 4 comments
Open

Cross-filtering does not work when using fold transformation #494

florjaco opened this issue Aug 28, 2024 · 4 comments

Comments

@florjaco
Copy link

First of all, thanks for developing Deneb!
I had to create a custom "table" using Deneb like in this video: https://www.youtube.com/watch?v=2wZpdZ8hCik.
When I try to get a row filtered in this matrix, based on a selection on another visual, cross-filtering does not work. I see in the original unfolded dataset that the right data point is filtered. However, in the dataset_0 data layer, no data is available. I would have expected the filtered row from the original dataset to be unpivoted with the fold transformation.
When looking at the dataset using cross-highlighting instead of cross-filtering none of the rows appear as "on" in the selected column.
Is this expected?
Thanks!

@dm-p
Copy link
Member

dm-p commented Aug 28, 2024

Hi, and thanks for using it!

I'd need to know more about your spec and data to comment in detail, but I'll provide my suspicions and maybe you can fill in the blanks. A fold transform will mutate the dataset from its original grain, and the transformed data stream probably does not contain the correct __row__ identifier that is required to reconcile back to Power BI. You can confirm this by checking the resulting data_x dataset for a layer or mark in the debug pane.

If the granularity of your data stream matches the original dataset after transformation, as long as you can ensure that the __row__ identifier is present, cross-filtering should work as you expect. If you have transformed the data away from this, then Power BI will not know what to do as it can no longer reconcile the datum to anything it originally sent to the visual.

@florjaco
Copy link
Author

Thank you for such a quick response! I really appreciate it.
My transformation of the data set includes calculating a rank to be able to sort the elements of the dataset by one of my columns. Then I carry out the fold transform to unpivot a set of columns with different metrics. As far as I can see, the row identifier is kept when I do these transformations on the dataset. In fact, when using fold row is repeated across the rows that are being unpivoted, which is what I would expect. However, the cross-filtering or cross-highlighting behavior is not taking this into account apparently.
See for example,
image. This element has been selected in another visual, cross-highlighting enabled in the interactions and in Deneb settings and I would expect the selected field to be "on" instead of neutral.
When I test interactions between these same visuals in the opposite direction it works fine, i.e., a selected element of the table cross-highlights the other visual correctly. This makes me wonder if it could be related to a one-to-many relationship between the row identifier across visuals being caused by the fold transform that PowerBi can't handle?

@dm-p
Copy link
Member

dm-p commented Aug 29, 2024

The relationship in your model shouldn't affect Deneb's internal treatment of the dataset. Custom visuals know nothing about the data model apart from the fields provided, and Power BI resolves everything on their behalf. We will need more information to get to the root cause of your problem and to understand if this is an issue with your specification or Deneb in this case.

Because I develop and maintain Deneb for free, I don't have the bandwidth to set up complex scenarios to find potential issues independently. Anything that folks can do to reduce my time spent on debugging will help me get to the root cause faster and either find a solution or a fix.

Please provide a minimally reproducible copy of your issue and supporting visuals in a Power BI workbook, preferably with anonymized data, and attach it here (rename the .pbix to a .zip). I will try to find time to look into what the issue might be. To manage your expectations, I will shortly be taking some leave, so I will have even more limited capacity over the next couple of weeks, but I will try to find some time if you can provide something that helps me see the issue in context.

If you need more dedicated assistance, it may be better to engage with a community expert (refer to the Support page for more information on how to do this and how to help them help you faster.)

@florjaco
Copy link
Author

Thanks for your support!
When building a simplified version of the PBI to share here, I realized that the issue is not actually with the fold operation. It's a filter transformation that I applied to the data that is affecting the cross-filtering.

I generated two reports, one without the additional filter, where cross-filter is working as expected and another one with this additional transformation step, where cross-filtering is not working. Test Pareto.zip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants