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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Anonymous
Not applicable

Get value from two filters

 

Hi,

 

I'm trying to create 2 filters in a measure to use in my card label. The porpose is to select a month (for example Fev), get the SUM of the "Quantidade Tons", filtered by the column "Estado Ano" that have "Current", and simultanialy it calculate the SUM of Jan+Fev.

 

If I remove the First filter, they work almost fine... I've the calculation without the "Current" filter. But, if I use the following code, I just have the values without the calculation (Jan+Fev). 

 

How can use the two filters together?

 

Consumo de clientes Tons Current Year = 
CALCULATE (
    SUM ( 'OINV E ORIN'[Quantidade Tons] );
	FILTER ('OINV E ORIN';'OINV E ORIN'[Estado Ano]="Current");
    FILTER ( 
	ALL(
       'Calendar'[Date]);
        'Calendar'[Date] <= MAX ( 'Calendar'[Date] )
    )
)

 

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion

Okay I'm just guessing here you want a Year-To-Date Total

 

Does this give you what you are looking for?

Consumo de clientes Tons Current Year =
TOTALYTD ( SUM ( 'OINV E ORIN'[Quantidade Tons] ); 'Calendar'[Date] )

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

@Sean, thank you! It works like a charm with current year. I also use your code to use "last" year.

 

Consumo de clientes Tons Previous Year = CALCULATE(SUM('OINV E ORIN'[Quantidade Tons]); DATEADD(DATESYTD(Calendar[Date]);-1;Year))
Sean
Community Champion
Community Champion

Okay I'm just guessing here you want a Year-To-Date Total

 

Does this give you what you are looking for?

Consumo de clientes Tons Current Year =
TOTALYTD ( SUM ( 'OINV E ORIN'[Quantidade Tons] ); 'Calendar'[Date] )

Helpful resources

Announcements
October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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 Kudoed Authors