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
pegaiarsa
New Member

Return a list of items filtered by a What-If parameter

Hello,

I have a dataset that has our products in column A and their corresponding gross revenue on column B. I've created a parameter called "Revenue Threshold". I use this parameter to create measures that tell me: how many products are bellow the threshold, how much revenue that represents and how many products would be left in our portfolio after the removal of those below the threshold.

 

Please see below a mockup of the data:

 

Product Revenue
P110
P220
P330
P440
P550
P660
P770
P880
P990
P10100

 

Measures:

Products Left = 
COUNTROWS(Table1) - CALCULATE(COUNTROWS(Table1), FILTER(Table1, Table1[Revenue] < 'Revenue Threshold'[Revenue Threshold Value]))


Revenue Lost = 
CALCULATE(SUM(Table1[Revenue]), FILTER(Table1, Table1[Revenue] < 'Revenue Threshold'[Revenue Threshold Value]))

And below you can see what is the table I want to display after selecting "50" on the Revenue Threshold slicer:

Product Revenue
P550
P660
P770
P880
P990
P10100


I'm trying to generate a table or column that shows me all the products which have revenues below the threshold. I've tried to generate a calculated table, but I'm aware that what-if parameters and calculated tables do not work togheter. Is there a way to acomplish this?

 

Right now there are no relationships between the Parameter and Table1. Should there be one?

 

I've read something about using the measure to filter a visual directly, but I couldn't make that happen.

Best Regards,

Pedro.

1 ACCEPTED SOLUTION
johnt75
Super User
Super User

You could create a measure like

Product is below threshold = IF( SELECTEDVALUE( 'Table'[Revenue]) < [Revenue Threshold Value], 1 )

and add that to a table visual as a visual level filter to only show when the value is 1

View solution in original post

2 REPLIES 2
johnt75
Super User
Super User

You could create a measure like

Product is below threshold = IF( SELECTEDVALUE( 'Table'[Revenue]) < [Revenue Threshold Value], 1 )

and add that to a table visual as a visual level filter to only show when the value is 1

Thank you very much John. That did it!

Best Regards,

Pedro.

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.