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.
Hi,
Currently I have a report that has a table that lists all the clients we have.
The slicer I am using is just a list of our clients.
What I want to do is filter the table to show all the clients that are in the same industry as the one selected in the slicer.
The client table has industry
Then once this is done only show the top 10 sales figures for the industry.
Currently the table will only filter and show the client selected in the slicer unless I disconnect them and then all data is shown.
Can anyone help me filter the table by industry and not client
Thank you
Hi @BIDrone,
Please check followings steps as below:
1. Create measure:
TOPN = RANKX(ALL('Table'[client]),[Measure])
Measure = SUM('Table'[sales ])
Measure 2 =
VAR sv =
SELECTEDVALUE ( 'Table 2'[client] )
VAR ind =
CALCULATE (
MAX ( 'Table'[industry ] ),
FILTER ( ALL ( 'Table' ), 'Table'[client] = sv )
)
RETURN
IF ( MAX ( 'Table'[industry ] ) = ind && [TOPN] < 4, 1, BLANK () )
2. Add measure 2 to filter:
3. Result would be shown as below:
BTW, Pbix as attached. Hopefully works for you.
Best Regards,
Jay
Community Support Team _ Jay Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Jay
Thank you for coming back to me.
Unfortuantley the code doesnt work I still get 1's next to the client whether it is in the same industry or not.
I have opend your PBIX file but it doesnt contain the code in it.
I'll keep trying with the code.
Thank you again
Hi @Anonymous ,
Please check this pbix again.
Otherwise, please share your sample data to me if you don't have any Confidential Information.
Please let me know if i can help.
Best Regards,
Jay
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |