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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

Calculated column based on slicer

Hi everyone,

let's say I have a table Predictions with three columns: prediction (text), confidence (percentage) and is_correct (boolean).

I have a numeric slicer that filters rows with low confidence (greater than filter). I would like to create a calculated column is_above_filter that dynamically updates based on the slicer.

I tried creating a measure min_confidence that gets the minimum of the confidence based on the filter.

Then I created a new table Unfiltered=ALL(Predictions) to avoid filtering of rows.

On the new table I created the is_above_filter column with the condition Unfiltered[confidence]>=min_confidence.

The problem with this approach is that the column doesn't update when the measure updates.

Can you suggest a way of achieving this using Power BI?

Thank you very much

2 REPLIES 2
AlexisOlson
Super User
Super User

It is not possible to create a calculated column that is dynamically responsive to a slicer since the calculated column is only computed when loading or refreshing the data model. Measures, on the other hand, are computed dynamically in response to slicers and filters, so this is what you'll need to use.

 

I can't tell enough from your post to be able to suggest an appropriate measure.

richbenmintz
Solution Sage
Solution Sage

Hi @Anonymous,

 

Can you use a measure to identify if the row is above the selected slicer value and then filter your table with that? 

 

If you could share some data, and an expected result with visualization, would be easier to craft a solution



I hope this helps,
Richard

Did I answer your question? Mark my post as a solution! Kudos Appreciated!

Proud to be a Super User!


Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.