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.
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:
But now the requirement is to be able to select a person and see what their bonusses are. Here an example of the data:
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!
Solved! Go to Solution.
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
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
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
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:
When I remove the measure, it only shows the selected person:
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
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
97 | |
78 | |
64 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |