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
Botturovic
Frequent Visitor

Filter in a measure

Hello everyone,

 

I would need to filter the values of a column to separate the values = or > to 0, and the values < to 0.

The values in the column come from a measure, but i can't manage to use the normal visual filters of Power Bi.
Maybe i can create two other calculated measures called >1 and <1, but i can't find the formula.

Can you help me?

 

Schermata 2020-10-13 alle 14.57.15.png

 

 

 

1 ACCEPTED SOLUTION

Hi @Botturovic ,

 

You can create something like below:

 

 

Risultato% >1 = VAR A = SUMMARIZR('Table','Table'[ID],"_Risultato%",[Risultato%Comm]) RETURN COUNTX(A,[_Risultato%]>1)/COUNTROWS(A)

Risultato% <1 = VAR A = SUMMARIZR('Table','Table'[ID],"_Risultato%",[Risultato%Comm]) RETURN COUNTX(A,[_Risultato%]<1)/COUNTROWS(A)

 

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

 

View solution in original post

4 REPLIES 4
Botturovic
Frequent Visitor

Thank you for your answers,

 

But what i need is to find the percentage of data over 0 and under 0, 

 

Schermata 2020-10-13 alle 16.40.55.png

so i assume i need to create somehow two measures from the original, splitting the original measure in >1 and >1 (0r >0 and >0)

 

Hi @Botturovic ,

 

You can create something like below:

 

 

Risultato% >1 = VAR A = SUMMARIZR('Table','Table'[ID],"_Risultato%",[Risultato%Comm]) RETURN COUNTX(A,[_Risultato%]>1)/COUNTROWS(A)

Risultato% <1 = VAR A = SUMMARIZR('Table','Table'[ID],"_Risultato%",[Risultato%Comm]) RETURN COUNTX(A,[_Risultato%]<1)/COUNTROWS(A)

 

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Best Regards,

Dedmon Dai

 

amitchandak
Super User
Super User

@Botturovic , You can put a viusal level filter to filter measure values

themistoklis
Community Champion
Community Champion

@Botturovic 

 

You can use Filter_Type = Advanced Filtering and not Basic Filtering from Filter Pane.

This way you can advantage of the AND or OR statements

Filter.JPG

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.