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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Fali324
Helper II
Helper II

Dynamic Table based on Parameter

Hi

 

I have created a parameter which will select a value between 1m - 100m
I then have two measures Lowerbound and Upperbound.

I then want to use this range to filter a table

 

Is this possible?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Fali324 , Hope you created numeric parameter

then you will two measure

Min = minx(allselected(param), Param[Value])

 

max = maxx(allselected(param), Param[Value])

Use in measure =
Countrows(filter(Table, Table[Value] >= min && Table[Value] <= Max ) )

https://docs.microsoft.com/en-us/power-bi/desktop-what-if

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

6 REPLIES 6
danextian
Super User
Super User

Hi @Fali324 

 

If you're trying to create a calculated table that udpates based on parameter selections, that  is not possible. Calculated tables update only upon refresh, when the formula itself has or the referenced tables have been modified. It isn't aware of any slicer selection.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

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


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
govind_021
Resolver III
Resolver III

Hi @Fali324 
Please try following code

FilterMeasure =
VAR SelectedValue = SELECTEDVALUE( 'ParameterTable'[ParameterValue] )
VAR LowerBound = SelectedValue * 0.9
VAR UpperBound = SelectedValue * 1.1

RETURN
IF(
SELECTEDVALUE( Sales[SalesAmount] ) >= LowerBound &&
SELECTEDVALUE( Sales[SalesAmount] ) <= UpperBound,
1,
0
)

then apply this measure as a filter in your table visual and set it to 1.

Rathish_Sakthi
Regular Visitor

Hi , Yes it is possible to create a dynamic table using parameters.
To help further with your question can you attach a picture or define what exactly needs to be done. However On the overview you can create a measure to check whether the table value falls within the upperbound and lowerbound  values and return "1" or "0" based on the condition and once the measure is created , you can add the measure to filter section of your visual. If you want further clarification please feel free. 
 
Thanks.

 

amitchandak
Super User
Super User

@Fali324 , Hope you created numeric parameter

then you will two measure

Min = minx(allselected(param), Param[Value])

 

max = maxx(allselected(param), Param[Value])

Use in measure =
Countrows(filter(Table, Table[Value] >= min && Table[Value] <= Max ) )

https://docs.microsoft.com/en-us/power-bi/desktop-what-if

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

yes its a numerical parm

Fali324_0-1738238389448.png



I've created the measures you've mentioned above. how do I now filter the table?



@Fali324 , You can filter calculated tables. You can only filter measures. Like one I have give in example

 

Other examples are 

TOPN with Numeric Parameter -https://youtu.be/cN8AO3_vmlY?t=26448

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.