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
Anonymous
Not applicable

Best way to filter a table?

I have a table visual made up of multiples fields/columns from multiples linked tables. 

 

I need to filter the main tables by two seperate columnes (both of which are date values) (i.e. show clients that have a date within one column and no date within another).

I cannot seem to create a formula to filter the table by.

 

What is the best way to go about this?

 

 

 

1 ACCEPTED SOLUTION

See this CALCULATETABLE() definition by SQLBI, and the Related Articles section at the bottom. You can set filters in CALCULATETABLE() on a number of columns. It is best if the data has relationships between the tables you are working on and not get involved in using TREATAS() on unrelated tables.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

3 REPLIES 3
edhans
Super User
Super User

Formulas/measures don't filter tables. Slicers and filters filter tables.

 

You could use CALCULATETABLE() with filters to create a new table filtered as you want.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Anonymous
Not applicable

Hi, thank you for the suggestion.

I would like to learn how to use CALCULATETABLE() to create a new table based upon my required fitlers. What is the best way to go about learning about going about this? I need to fitlers based upon anumber of columns, all of which are pulling from seperate (but linked) data tables.

@edhans 

See this CALCULATETABLE() definition by SQLBI, and the Related Articles section at the bottom. You can set filters in CALCULATETABLE() on a number of columns. It is best if the data has relationships between the tables you are working on and not get involved in using TREATAS() on unrelated tables.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

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.