in a table, I have three columns named col1;col2;col3, each one contains eather a 1 or a 0. I have also another column for the sales.
In another table, I have a column that contains col1;col2;col3 (I have created manually, but I think I can created automatically using VALUES function).
In my dashboard, I would like that the user has a slicer where he can select any of the three col1;col2;col3 (either only 1 but multiple selection should be allowed as well), and depending on his selection the proportion of the sales is computed when colX =1
i don't know how to refer to these columns to indicate tablename[col selected in the slider]=1
Also I have other filters so I would like to keep these filters. I have attached an example of what I would like.
PS: is this the optimal way the database should look like? another solution would be to put into long format?
Since I am new in Power BI I can't figure out how to structure my data in an optimal way for power BI
Thanks for your answer now that I got a newer version (2.60) I could make your example work and I am glad to realise that I follow the logic you propose.
In theory it is working if the user selects a unique column but in practice there will be 20 or more choices and user should be able to select 1 or 10! (or any other number).
But since isselected work for only a single choice, I am stuck.
How would you do that?
I was thinking from a database viewpoint of each time a user selects one thing, a "table" with the corresponding products and having condition=1 is computed and after whatever the number of tables, an union of these tables should be done to get all the relevant products and compute a sum.
In theory this should work? But I might not have the right database logic to solve it in power bi ? (and I have checked calculated table does not able to do what i want).
Thanks for your time, I really think power bi is the right tool and what I request is typical things straight forward for power bi (slicers....) but it takes time to program what we want!