Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Values() not working in role security

Hello,

 

I'm having a Simplified role role like

=QUEUE_CURR[QUEUE_UID]=
IF(COUNTROWS(VALUES(QueueSel[GROUP_ID]))<>1
,LOOKUPVALUE(QueueGroups[QUEUE_UID],QueueGroups[MEMBER_MAIL], USERNAME(), QueueGroups[QUEUE_UID], QUEUE_CURR[QUEUE_UID])
,LOOKUPVALUE(QueueGroups[QUEUE_UID],QueueGroups[MEMBER_MAIL], USERNAME(), QueueGroups[QUEUE_UID], QUEUE_CURR[QUEUE_UID], QueueGroups[GROUP_ID], VALUES(QueueSel[GROUP_ID])))

The idea is that when a user has not selected a Queue Group he is allowel to see all queus in the 1+n groups he is assigned to. This works fine.

When he has selected a group he only see the queues that are grouped in that group and for wich he has clearance.

 

But, I have the impression that the code 

COUNTROWS(VALUES(QueueSel[GROUP_ID]))

Works fine in a measure, we see the value changing when a queue or all are selected, but when used in a role then choosen records/filters in slicers are not used, its always all.

 

I have changed the role-rule into, and wharever number is selected always the Queue with UID 4 is shown (4 record in the dataset).

=QUEUE_CURR[QUEUE_UID]=COUNTROWS(VALUES(QueueSel[GROUP_ID]))

 

Does dis make sense ?

 

And if so, is there a way to workarround ?

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi @Anonymous

Does the first formula work well for your requirement?

If not, which part it can’t satisfy?

“I have changed the role-rule into, and wharever number is selected always the Queue with UID 4 is shown (4 record in the dataset)”

Does this your goal to achieve or something you have made until now?

Does this rule mean that once a number (refer to which column?) is selected (where to select, in a slicer?), the table will show data of QueueSel[GROUP_ID]=4?

 

Best Regards

Maggie

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors