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
Analitika
Post Prodigy
Post Prodigy

Filter measure in Power BI

Hi,

 

I would like to filter measure according to another measure condition. For example, calculate(a, filter(b<30).

But problem is that new column becomes same as old. I don't get why it happens.

 

For example,

Analitika_0-1670407747586.png

Measure equals to Bendra skola even Measure contains blank values, so how to fix my measure to calculate correctly.

5 REPLIES 5
Aburar_123
Resolver IV
Resolver IV

Hi @Analitika ,

 

Can you just change the measure like below,

 

Filtered measure =
SUMX (
FILTER (
AllSelected( 'DBA klient_tiekejai'),
[DATA PRADELSIMAS_ST] <= 30
),
CALCULATE ( [_m_ST_Bendra_Skola] )
)

 

 

Please Accept it as a solution if it solves your problem. Thanks.

johnt75
Super User
Super User

When the calculation is performed at the grand total level then the filter condition is met. You need to iterate over whichever column provides a unique identifier for the row in your table, e.g. if the rows each show a different date then you could use

Filtered measure =
SUMX (
    VALUES ( 'Date'[Date] ),
    CALCULATE ( [A], FILTER ( 'Table', [B] < 30 ) )
)

 

I tried but it didn't change at all:

Filtered measure =
SUMX (
VALUES ( 'DBA klient_tiekejai'[kli_pav] ),
CALCULATE ( [_m_ST_Bendra_Skola], FILTER ( '_Measures_ST_PS', [DATA PRADELSIMAS_ST] <= 30 ) )
)
 
Analitika_0-1670414915700.png

 

Try

Filtered measure =
SUMX (
    FILTER (
        VALUES ( 'DBA klient_tiekejai'[kli_pav] ),
        [DATA PRADELSIMAS_ST] <= 30
    ),
    CALCULATE ( [_m_ST_Bendra_Skola] )
)

I have inserted that measure but my visual can't load,  memory exceeded. Getting this:

Analitika_0-1670416590436.png

 

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.