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
AmandaCarriveau
Frequent Visitor

Need to apply a nested filter to a table visual

I am connected live to a Power BI semantic model. So I can't create a new column etc. I am trying to write a DAX measure that will allow me to filter a table visual. The model includes a field called RPN which displays a number (1-70) and field called Level which displays one of four names (low, medium, high, TBD). I need to filter my table visual to only show results where RPN is >30 -OR- RPN is less than or equal to 30 and Level is medium or high. Any suggestions?

1 ACCEPTED SOLUTION

Amanda,

 

Honestly, this would ideally be done upstream anyway. I know you said you couldn't modify the model yourself. However, is it possible to ask whoever has control over the data source itself to add in that filter as a column for you?


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

View solution in original post

5 REPLIES 5
AmandaCarriveau
Frequent Visitor

Thanks! But when I tried this, I got the "Visual has exceeded the available resources" error.

Amanda,

 

Honestly, this would ideally be done upstream anyway. I know you said you couldn't modify the model yourself. However, is it possible to ask whoever has control over the data source itself to add in that filter as a column for you?


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

Yep, I can, was just hoping I could do it myself, thanks for the suggestion!

I hear you, sometimes it's necessary. However, performance tends to be better the closer to the data source you can do the transformation. 😄

Wilson_
Memorable Member
Memorable Member

Hi Amanda,

 

You can create a measure like:

 

Table Visual Filter =
VAR SelRPN = SELECTEDVALUE ( Table[RPN] )
VAR SelLevel = SELECTEDVALUE ( Table[Level] )
VAR Result = SelRPN > 30 || ( SelRPN <= 30 && SelLevel IN { "Medium", "High" } )

RETURN FORMAT ( Result, "" ) -- converts True/False to text

 

 

Then in your table visual, you can add the measure as a filter and filter for Table Visual Filter is True.


----------------------------------
If this post helps, please consider accepting it as the solution to help other members find it quickly. Also, don't forget to hit that thumbs up and subscribe! (Oh, uh, wrong platform?)

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.