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

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.

Reply
Anonymous
Not applicable

How to use selected value to calculate and apply the changes to the selected Group only?

I have a dax where I use a variable to store scores & calculate based on the selected value.

Weight Total Acceptance = 
Var  mm = selectedvalue('DeliveryGroup Paramter'[Group Name])
var lk=IF(
    'Sprints'[Measure Current Accepted Point %] >0.85,
    "5",
    IF(
        'Sprints'[Measure Current Accepted Point %] > 0.7 && 'Sprints'[Measure Current Accepted Point %] <0.85,
        "3",
        If('Sprints'[Measure Current Accepted Point %] <0.7,"1"
    )))

var kk=IF(
'Sprints'[Measure Current Accepted Point %] >0.50,
"5",
IF(
'Sprints'[Measure Current Accepted Point %] > 0.3 && 'Sprints'[Measure Current Accepted Point %] <0.4,
"3",
If('Sprints'[Measure Current Accepted Point %] <0.1,"1"
)))

Return if( mm ="Frontline DG", kk, lk)

My parameter table is like this with two Group names.

GroupName      Name
FrontLine DG   FrontLine DG
Retail DG      RetailDG

I have a slicer with the Group name and whenever I select the group name my table visual measure changes based on the above scoring policies.

Group Name      Weight Total Acceptance
FrontLine DG      3
FrontLine DG      6
FrontLine DG      4
Retail DG         10
Retail DG         5
Retail DG         7

Right now If I select "Frontline DG", it will use one of the if logics from the above and change the values of the above table and change all rows including "Retail DG" value. What I want is if I select "FrontLine DG", i want to calculate the weight total acceptance for the first 3 rows only using the specified logic. the lower 3 rows with "Retail DG" should use their own specified logic. Any help?

2 REPLIES 2
v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,


Could you tell me if your problem has been solved?
If it is, kindly Accept it as the solution. More people will benefit from it.
Or you are still confused about it, please provide me with sample data and expected results.


Best Regards,
Stephen Tao

v-stephen-msft
Community Support
Community Support

Hi @Anonymous ,

 

I think you should create a seperate table to put the field you want select.

For the top three rows you want to take, you can sort them by using the RANKX function.

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.