Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have a slicer and I've been using Filter = if(HASONEVALUE('Table name'[Column name])=False, 0, 1) to prevent any data to show in my matrix table if there's no selection, or if there's more than one selection in that slicer.
Solved! Go to Solution.
Hi @Anonymous ,
One option you could consider is using the USERNAME() function to filter the data in your matrix table based on the logged-in user. For example, you could use a filter like this:
Filter = IF(USERNAME() = 'Table name'[Column name], 1, 0)
This would show the data in the matrix table only if the logged-in user's username matches the value in the Column name column in the Table name table.
Alternatively, you could use a combination of HASONEVALUE and USERNAME to achieve the same effect. For example:
Filter = IF(AND(HASONEVALUE('Table name'[Column name]), USERNAME() = 'Table name'[Column name]), 1, 0)
This would show the data in the matrix table only if there is a single value selected in the slicer and the logged-in user's username matches the value in the Column name column in the Table name table.
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
One option you could consider is using the USERNAME() function to filter the data in your matrix table based on the logged-in user. For example, you could use a filter like this:
Filter = IF(USERNAME() = 'Table name'[Column name], 1, 0)
This would show the data in the matrix table only if the logged-in user's username matches the value in the Column name column in the Table name table.
Alternatively, you could use a combination of HASONEVALUE and USERNAME to achieve the same effect. For example:
Filter = IF(AND(HASONEVALUE('Table name'[Column name]), USERNAME() = 'Table name'[Column name]), 1, 0)
This would show the data in the matrix table only if there is a single value selected in the slicer and the logged-in user's username matches the value in the Column name column in the Table name table.
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous see if something like below works for you
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 38 | |
| 36 | |
| 28 | |
| 28 |
| User | Count |
|---|---|
| 124 | |
| 89 | |
| 73 | |
| 66 | |
| 65 |