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

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

Reply
AlexisPREVOT
Resolver I
Resolver I

Error on a measurement serving as a filter

Hi,

 

I wanted to make a measurement that was to serve as a filter for a table.
My idea being to be able to delete certain rows from my table by excluding them.

 

So I wrote the following formula: 

 
Mesure 9 =
VAR h =
    LOOKUPVALUE('Requête2'[ARTICLES (2).article UNIVERS.NOM_UNIVERS], 'Requête2'[ARTICLES (2).article UNIVERS.NOM_UNIVERS], MAX('Table calculée'[ARTICLES (2).article UNIVERS.NOM_UNIVERS]))

RETURN
    IF (
            ISFILTERED ('Table calculée'[ARTICLES (2).article UNIVERS.NOM_UNIVERS]),IF (h IN VALUES ('Requête2'[ARTICLES (2).article UNIVERS.NOM_UNIVERS]), 1, CALCULATE(COUNTROWS('ENTITE'),ALLEXCEPT('ENTITE','ENTITE'[ENT_ID]),'Requête2'[ARTICLES (2).article UNIVERS.NOM_UNIVERS]=h)),0
    )
 
My idea seems to work but when in the visual filters I indicate that I don't want to display all the measures equal to 1, it deletes me rows while I do not select anything in my segment (the segment is 'Table calculée'[ARTICLES (2).article UNIVERS.NOM_UNIVERS] ).
 
 For example, the result when I do "display all" with measure 9 (and my segment is on "All")
 
AlexisPREVOT_0-1672064185525.png

 

And when I ask measure 9 is not 1

AlexisPREVOT_1-1672064333494.png

 

Can you help me please, because if without segment selection my basic screen is wrong, I don't understand how to have the right result at the end.

 

Thank you by advance.

1 REPLY 1
amitchandak
Super User
Super User

@AlexisPREVOT , You have use segmentation for that

 

examples

---- between value

Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1...


Dynamic Segmentation, Bucketing or Binning: https://youtu.be/CuczXPj0N-k

 

------Discrete value

Dynamic segmentation -Measure to Dimension conversion: https://youtu.be/gzY40NWJpWQ

 

--- Text Value

 

Customer Retention with Dynamic Segmentation, New/Lost/Retain Customer Count: https://www.youtube.com/watch?v=W4EF1f_k6iY

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors