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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Create a new calculated table using filtering based on a what-if parameter does not work

I have the following table and i want to filter one of two rows based on a what-if parameter.

 
Threshold Lower  Threshold Upper Intercept Gradient 
01000000.052
1000002000000.14

 

 

I have tried to create a new calculated table using the following DAX formula:

 

Table_New = FILTER('Table', AND('Table'[Threshold Upper] >= 'Parameter'[Parameter Value],'Table'[Threshold Lower] <= 'Parameter'[Parameter Value]) )
 
 
It does work but when i change the value of the parameter the table does not updated. 
How I can fix this?
4 REPLIES 4
Anonymous
Not applicable

So, what the measure will include?

By the way, countows is not defined as function in my Power BI

@Anonymous , Sorry typo, countrows, use can use countx, sumx, minx, maxx and then use this var table

Measure =

var _Table_New = FILTER('Table', AND('Table'[Threshold Upper] >= 'Parameter'[Parameter Value],'Table'[Threshold Lower] <= 'Parameter'[Parameter Value]) )

return

countrows(_Table_New )

 

 

or

 

return

countX(_Table_New,_Table_New[Value]  )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Why it returns the count of rows?

amitchandak
Super User
Super User

@Anonymous , You can not use any slicer or what-if parameter value in the creation of a calculated table.

 

You can create a table using that as var in measure. Each measure that need this table, you need to have that

 

Measure =

var _Table_New = FILTER('Table', AND('Table'[Threshold Upper] >= 'Parameter'[Parameter Value],'Table'[Threshold Lower] <= 'Parameter'[Parameter Value]) )

return

countows(_Table_New )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.