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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
Zbig62
Regular Visitor

Problem with the range of measures presented in the chart

Hello

I have a problem with mastering the range of measures presented on a line chart.

After setting filters in the table, I get the correct results. One on the chart for the entire range of data (from 1 to 83) one of the measures LCL(IX)50_lines shows values ​​from the range of 1 to 500.....

 

Zbig62_0-1728936730131.png

However, if I limit the range to, for example, 1 - 82, all measures are presented correctly

 

Zbig62_1-1728936808941.png

I am trying to limit the scope of this measure but without any positive effects

 

LCL(IX)50_lines =

VAR a = COUNTX(ALLSELECTED('public Measurement'); 'public Measurement'[result])

RETURN

CALCULATE(

    [Cl(IX)50_lines] - 2,66 * [CL(MR)50_lines];

    'public Measurement'[number] <= a

   

)

 

I kindly ask for help

Best regards

2 REPLIES 2
Anonymous
Not applicable

Hi  @Zbig62 ,

 

If it is convenient, could you describe the dax formulas for [CL(IX)50_row] and [CL(MR)50_row]?

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data. We can better understand the problem and help you.

 

Best Regards,

Liu Yang

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

Ok

I'll try to isolate the problem. Below is a formula that works correctly for the data range set on the filters, all values ​​are correct.

Cl(IX)50_lines =

VAR a = 50

VAR mn = MINX(ALLSELECTED('public Measurement'); 'public Measurement'[number])

VAR mx = MAXX(ALLSELECTED('public Measurement'); 'public Measurement'[number])

VAR MxM = mx - mn

VAR d = IF(MxM <= a; mn; mx - a)

RETURN

CALCULATE(

    AVERAGEX(

        'public Measurement';

        'public Measurement'[result]

    );

    FILTER(

        ALLSELECTED('public Measurement');

        'public Measurement'[characteristicId] = MAX('public Measurement'[characteristicId]) &&

        'public Measurement'[number] >= d

    )

)

Zbig62_0-1728973658597.png

I need to create a second measure that will subtract a value of, for example, 2.66 from the value of the first measure (Cl(IX)50_lines).

LCL50 Test =

VAR a = MAXX(ALLSELECTED('public Measurement'); 'public Measurement'[number])

RETURN

CALCULATE(

    [CL(IX)50] - 2,66;

    FILTER(

        ALLSELECTED('public Measurement');

        'public Measurement'[number] <= a

    )

)



Zbig62_1-1728973746367.png

 

I get the correct result but the data range changes. Where is the error?

please help



Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

Find out what's new and trending in the Fabric community.