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

measure or column to filter out record from a table

Hi,

I am trying to filter out a particular value from a table using DAX, but when I try to use Filter or ALLExcept I am getting errors.

kindly help me with the formula.

 

 

RaviScreenshot1.PNG

 

 

1 ACCEPTED SOLUTION

Hi @Anonymous,

 

Basically, the filtering functions let you manipulate data context to create dynamic calculations.

 

For example, if you want to count the number of "Associate Id" which is not "2014", then you can just use the formula below to create a measure for it and show the measure on the report.Smiley Happy

Measure =
CALCULATE (
    DISTINCTCOUNT ( 'Final_Data'[Associate Id] ),
    FILTER ( 'Final_Data', 'Final_Data'[Associate Id] <> 2014 )
)

 

Regards

View solution in original post

6 REPLIES 6
v-ljerr-msft
Employee
Employee

Hi @Anonymous,

 

In addition, instead of creating a measure or column, you can try creating a new table in this scenario.

 

t1.PNG

 

Regards

Anonymous
Not applicable

Thanks JJ and v-ljerr-msft , is it possible to have the filter in a formula without creating a new table?

 

Thanks,

Ravi

Hi @Anonymous,

 

Basically, the filtering functions let you manipulate data context to create dynamic calculations.

 

For example, if you want to count the number of "Associate Id" which is not "2014", then you can just use the formula below to create a measure for it and show the measure on the report.Smiley Happy

Measure =
CALCULATE (
    DISTINCTCOUNT ( 'Final_Data'[Associate Id] ),
    FILTER ( 'Final_Data', 'Final_Data'[Associate Id] <> 2014 )
)

 

Regards

Anonymous
Not applicable

Thanks v-ljerr-msft, that was very helpful ! but I am still not clear with some of the filter options 😞

I'm trying to figure out how you expect it to work. If you're adding a column to a table, what should that new column look like? Should it copy another column in the same table but remain blank on rows where that first column has a certain value?





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

Proud to be a Super User!




DoubleJ
Solution Supplier
Solution Supplier

Hi

 

Your formula returns a TABLE with of Type "Final_Data" including all records where "Associate ID" is not 2014. There could be many records fitting that filter. In a column of a row only a single value can be stored.

 

Could apply this filter already when importing the data?

 

JJ

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.