Skip to main content
Question

Select only one option from the Boolean metric. The other options get disabled.

  • January 20, 2025
  • 1 reply
  • 93 views

Spandan98
Master Author
Forum|alt.badge.img+10

Hello Pigment Community,

I just want one option to be marked, if suppose Absolute is checked, then the other options (Percentage and fixed) cannot be checked. How can I do this?
 

 Please kindly guide me to perform this operation. Thanks a lot!

1 reply

Issam Moalla
Employee
Forum|alt.badge.img+11
  • Employee
  • January 21, 2025

Hi ​@Spandan98 ,

To achieve your goal, you will need to leverage Access Rights (AR). Here's a step-by-step guide:

1. Create an AR Metric

You can use the ACCESSRIGHTS function with the following formula:

ACCESSRIGHTS(true[ADD: User,Options] , 'Radio button T/F'[ADD: User])

2. Configuration for Read and Write Access

  • Read Access: Apply TRUE for all users.
  • Write Access: Configure a specific metric, 'Radio button T/F', dimensioned by your Options dimension. Use the formula:
IF(
'Radio button selection'[REMOVE ANY: Options] = FALSE OR
ISBLANK('Radio button selection'[REMOVE ANY: Options]),
true[ADD: Options],
'Radio button selection'
)

3. Explanation of the Formula

This formula checks two conditions:

  1. No option selected with a FALSE value:
    'Radio button selection'[REMOVE ANY: Options] = FALSE
  2. No option selected or deselected (Blank value):
    ISBLANK('Radio button selection'[REMOVE ANY: Options])

     

If either of these conditions is TRUE, write access is allowed for all options :

 

the AR metric would be:
 

.Otherwise, write access is granted only for the selected option.

The AR metric would be:
 

4. Applying the AR Metric

Once configured, apply the AR metric in the Data Access Rights section.

 

5. Additional Resources

For more information on implementing AR, refer to:
Create an Access Rights Metrics and Rules

Hope this helps,
Issam