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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
LinhNguyen
Helper II
Helper II

Measure value based on selection

Hi everyone,

 

I'm trying to create a dynamic filter value based on slicer selection. 

 

In table 'Bonus Selection', I only have 1 column with "Yes" and "No" as value. I created a single selection slicer with that column.

Include bonus.PNG

Then, in another table, I wanted to create a measure based on the selection on the previous table. I have tried:

Cost Element Filter =
VAR _includeBonus = SELECTEDVALUE('Bonus Selection'[Include Bonus ?])
RETURN IF(_includeBonus = "No", "610030", "000000")
 bonus filter.PNG
It didn't show any error but there was not any value returned. Did I do something wrong?
4 REPLIES 4
mauriciosotero
Resolver III
Resolver III

Can you share a picture of the diagram of your model?

mauriciosotero
Resolver III
Resolver III

Hi,

 

Give more details what you are trying to do.

 

Why are you creating this measure? Isn't pososible to create a column in the 'Bonus Selection' with this values?

 

If this helps, I apreciate you give a kudo and mark as the solution. Thanks

I want to get that measure so that I can do a filter based on the viewer's choice. When the users choose "No", I want to filter out one particular cost element ID, which is the value returned in the formula earlier. I can place a filter on the whole page, lock and hide it so that no one can see.

With that said, creating the same measure in the Bonus selection table might help too. However it's a blank value even when I create that measure in the Bonus Selection table.

 

cust filter.PNG

I tried using calculated column as well but that didn't work either

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.