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

Conditional segmentaion based on specific value

Hi all,

In a previous thread we came to this function to use conditions in order to calculate a bonus value. 

Basicly

if value < 8500, 0 

if value < 9000, 100, 150

 

BonusTestM = 
VAR BonusMin = SELECTEDVALUE('BonusValue'[BonusMin])
VAR BonusMax = SELECTEDVALUE('BonusValue'[BonusMax])
VAR BonusValueMin = SELECTEDVALUE('BonusValue'[BonusValueMin])
VAR BonusValueMax = SELECTEDVALUE('BonusValue'[BonusValueMax])
RETURN
SWITCH(
TRUE()
,SUM(Income[Value]) < BonusMin, 0
,SUM(Income[Value]) < BonusMax, BonusValueMin
,BonusValueMax
)

 

I put these values in a table to make it eassier to change for management, like this:

shockl1ne_0-1611226805712.png

But now the requirement is to be able to select a person and see what their bonusses are. Here an example of the data:

shockl1ne_1-1611226880551.png

shockl1ne_2-1611226899618.png

So would it be possible to change the function so that you can click on a name in the left field, and it starts the function above with their bonus conditions/values? Hope my question is clear.

 

So for example I click "Eric" and it shows his income and at the same time the start the "BonusTestM" function with his bonus conditions/values from the last picture? So his minimum bonus would be 8500 to 9000 for 100 and 9000 and more for 150. I'm not sure if this is possible or what would be a good alternative. For example a check box where you select the persons name and that name is then used in the function to look up their bonus info?

 

Thanks a lot!

 

 

 

1 ACCEPTED SOLUTION
Pragati11
Super User
Super User

Hi @Anonymous ,

 

You can create a Slicer to have Person Names in then and then select the name.

What happens when you select a person's name, doen't it filter the value on your right table for that person only?

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

View solution in original post

7 REPLIES 7
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

So has it been solved by @ Pragati11 ? If so, you can accept the reply as solution, that way, other community members could easily find the answer when they get same issues.

 

Best Regards,
Community Support Team _ Yingjie Li

Pragati11
Super User
Super User

Hi @Anonymous ,

 

You can create a Slicer to have Person Names in then and then select the name.

What happens when you select a person's name, doen't it filter the value on your right table for that person only?

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

Hi @Pragati11 

 

Thansk for mentioning the slicer. I tried to click the names in the small table, but that didn't work.

The slicer seems to be working with the conditions of the individual people. Only thing is, it still shows everyone's data, but just lets the function work on a single person, if that makes sense.

Here's a picture:

shockl1ne_0-1611230050925.png

When I remove the measure, it only shows the selected person:

shockl1ne_1-1611230124261.png

 

Also the total value is still weird, but I'll figure that out later with the HASONFITLER you mentioned.

 

HI @Anonymous ,

 

Is it possible to share the pbix file for this after removing any sensitive information?

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Anonymous
Not applicable

Hi @Pragati11 ,

 

Yes this would be possible, it's currently just a test file. But I would prefer to share it in private. Can I maybe send it via private message?

Hi @Anonymous ,

 

I have sent you an updated pbix file with chnage to a relationship in your data model and it works as expected.

Let me know if this is what you need.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Hi @Anonymous ,

 

Sure send it in a private message.

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

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.