The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hello,
I've got a table that look like
UN | FT | TG |
UN1 | A | 1 |
UN1 | B | 2 |
UN1 | C | 3 |
UN1 | D | 4 |
UN2 | A | 5 |
UN2 | E | 6 |
UN2 | B | 7 |
UN3 | D | 8 |
UN4 | B | 9 |
UN4 | C | 10 |
UN4 | D | 11 |
UN4 | A | 12 |
UN4 | B | 13 |
and I would like to filter values of "FT" & "TG" columns with slicers but I do not achieve to get what i would like...
here the result I got
and here the result as I expected : i would like to always keep the full unique values of "FT" column and highlight the value linked to "UN 2"
is there a solution to do that please?
Thanks
Oonizuk
Solved! Go to Solution.
Hi, @Oonizuk
As Bibiano_Geraldo demonstrated, he uses the UN column at the * end to create a slicer. This is mainly due to the fact that the table on the * side will not filter the data on the first side, so as to achieve highlighting.
You describe to your yet another un table to connect to your fact table:
When creating a slicer using a UN table, we select an item that directly filters the data from the fact table.
To solve this problem, you should circumvent slicer filtering as demonstrated by Bibiano_Geraldo. Or you can set up two table relationship ports (or you can create another UN table that is not related):
Measure =
VAR _un= SELECTEDVALUE(Table2[UN])
VAR _FT = SELECTCOLUMNS(FILTER(ALLSELECTED(Table1),'Table1'[UN] = _un),'Table1'[FT])
RETURN IF(SELECTEDVALUE(Table1[FT]) IN _FT,1,0)
Here are the results:
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Oonizuk
I wish you all the best. Previously we have provided a solution to help you solve the problem. Since we haven't heard back from you yet, I'd like to confirm if you've successfully resolved this issue or if you need further help?
If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you for your patience and look forward to hearing from you.
Best Regards
Jianpeng Li
Hi, @Oonizuk
I wish you all the best. Previously Bibiano_Geraldo have provided a solution to help you solve the problem. Since we haven't heard back from you yet, I'd like to confirm if you've successfully resolved this issue or if you need further help?
If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you for your patience and look forward to hearing from you.
Best Regards
Jianpeng Li
Hello,
Sorry for the delay but the question is for work so on my working week 😉
I checked the solution and it was I expected
But on my real board i've got a previous table like
UN |
UN1 |
UN2 |
UN3 |
UN4 |
linked to the example I gave you and I did not find the solution to et the same results
I tried to create a new measure on this table but all button are either all orange eiher all white...
Thanks
Hi, @Oonizuk
As Bibiano_Geraldo demonstrated, he uses the UN column at the * end to create a slicer. This is mainly due to the fact that the table on the * side will not filter the data on the first side, so as to achieve highlighting.
You describe to your yet another un table to connect to your fact table:
When creating a slicer using a UN table, we select an item that directly filters the data from the fact table.
To solve this problem, you should circumvent slicer filtering as demonstrated by Bibiano_Geraldo. Or you can set up two table relationship ports (or you can create another UN table that is not related):
Measure =
VAR _un= SELECTEDVALUE(Table2[UN])
VAR _FT = SELECTCOLUMNS(FILTER(ALLSELECTED(Table1),'Table1'[UN] = _un),'Table1'[FT])
RETURN IF(SELECTEDVALUE(Table1[FT]) IN _FT,1,0)
Here are the results:
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Oonizuk ,
To achieve your result, please consider to follow these steps:
1- Create a new calculated column to get DISTINCT FT from your Table:
FT Table = DISTINCT('Table'[FT])
2- Create a relationship from FT table to Table with yhis properties:
3- Create a new measure with this DAX:
Measure =
IF(
HASONEFILTER('Table'[UN]),
IF(
NOT ISBLANK(SELECTEDVALUE('Table'[UN])),
1,
0
)
)
4- Add two tile slicers in your report, one for UN column from your table and other for FT column from FT table:
5- Now Select your FT slicer and go to format pane, expand Buttons and then expand the fill, and in color click on FX:
6- In the new window, in format style choose rules, and the field to based on choose the created measure, and in the rules set as shown bellow, and click ok:
Now your final output should look like this:
Here you can download the sample file: Highlight slicer buttons instead of filter
User | Count |
---|---|
62 | |
57 | |
54 | |
51 | |
33 |
User | Count |
---|---|
180 | |
88 | |
70 | |
46 | |
43 |