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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
I_miss_tableau
Frequent Visitor

Exclude rows based on number paramater

Hi, 

I tried to exclude rows which exclude rows based on user selection and received great help on this forum. Link below:

 

https://community.fabric.microsoft.com/t5/Desktop/Exclude-outliers-based-on-numeric-paramater/m-p/37...

 

Hovewer I don't want exclude outliers from only one measure but remove them completely in filters and calculate another measure without these rows. For now, I know how to calculate average excluding outliers. 

 

idRegionMeasure 1Measure 2Selected valueExclude
14325apac454490FALSE
436545emea56665590TRUE
55252apac345545690TRUE
25525amer12590FALSE
25552amer896690FALSE
552225emea4555690FALSE
5255225emea4514690TRUE
522552apac10067890TRUE
522552emea493390FALSE
2522emea1756690FALSE
25252amer23122490TRUE
252552emea67355690FALSE
522552amer 10133590TRUE
2552amer90323490FALSE

 

I need to create column TRUE/FALSE to exclude outliers for measure 1 (ids which are greated then 90). I dont want to create excluding formulas for all measures in the chart I will create. 

4 REPLIES 4
v-shex-msft
Community Support
Community Support

HI @I_miss_tableau,

You can try to use following measure formula to check records and return flag, then you can use it on 'visual level filter' to filter records:

flag =
VAR condit =
    MAX ( 'Table1'[Selected value] )
VAR filtered =
    CALCULATETABLE (
        'Table1',
        ALLSELECTED ( 'Table1' ),
        VALUES ( 'Table1'[id] ),
        VALUES ( 'Table1'[Region] )
    )
VAR summary =
    SUMMARIZE (
        filtered,
        'Table1'[id],
        'Table1'[Region],
        "Max_Rate", MAX ( [M1], [M3] )
    )
RETURN
    IF ( COUNTROWS ( FILTER ( summary, [Max_Rate] > condit ) ) > 0, "Y", "N" )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Thank you but this table was only an example because I must not share my work data. My data source contains about 20 measures and 100 dimensions, do I need to include all of them in your calculation?

Hi @I_miss_tableau,

For the fields use as category in summarize function, you only need the field that uses current visual as axis.

In addition, did these measure expressions need to be checked? If that's the case, you can modify above formula to use list operator and iterator aggregate function Maxx to handle them.

flag =
VAR condit =
    MAX ( 'NewTable'[Selected value] )
VAR filtered =
    CALCULATETABLE (
        'Table1',
        ALLSELECTED ( 'Table1' ),
        VALUES ( 'Table1'[id] ),
        VALUES ( 'Table1'[Region] )
    )
VAR summary =
    SUMMARIZE (
        filtered,
        'Table1'[id],
        'Table1'[Region],
        "Max_Rate", MAXX ( { [M1], [M2], [M3], [M4], [M5] }, [Value] )
    )
RETURN
    IF ( COUNTROWS ( FILTER ( summary, [Max_Rate] > condit ) ) > 0, "Y", "N" )

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

What do you mean by checking measures? I use different measures and I would need differetn aggregation for them. My excldusion will be based only on first measures so I want to exclude only rows which exceed selected value in M1. It doesnt matter what it is in m2,m3,m4 - rows with m1 over number paramater will be excluded.

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.