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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

TOTALYTD BASED ON MULTIPLE FILTERS

Hi,

 

I have the following YTD calculations:

 

YTD_inbound_lines_in_time = TOTALYTD(COUNT(Purchasing_data[OTD 0d]),Date_table[Date],Purchasing_data[OTD 0d]="On Time")
YTD_inbound_lines_early = TOTALYTD(COUNT(Purchasing_data[OTD 0d]),Date_table[Date],Purchasing_data[OTD 0d]="Early")
 
Now I want to combine "on time" and "early" in one TOTALYTD calculation called YTD_inbound_lines_in_time_and_early. This means that the inbound lines on time and early are added to one number.
 
I tried with && within the filter, but that does not work.
 
Does anyone has a solution?
1 ACCEPTED SOLUTION
AlB
Community Champion
Community Champion

Hi @Anonymous

 

Can you not add the two measures you have?

Have you tried with || , since you want both:

 

YTD_inbound_lines_in_time_OR_early =
TOTALYTD (
    COUNT ( Purchasing_data[OTD 0d] ),
    Date_table[Date],
    Purchasing_data[OTD 0d] IN { "On Time", "Early" }
)

But this measure should provide the same result as adding the two you already have. Each item can be either "On Time" or "Early", right?

View solution in original post

2 REPLIES 2
v-jiascu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

 

Could you please mark the proper answers as solutions?

 

 

Best Regards,

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
AlB
Community Champion
Community Champion

Hi @Anonymous

 

Can you not add the two measures you have?

Have you tried with || , since you want both:

 

YTD_inbound_lines_in_time_OR_early =
TOTALYTD (
    COUNT ( Purchasing_data[OTD 0d] ),
    Date_table[Date],
    Purchasing_data[OTD 0d] IN { "On Time", "Early" }
)

But this measure should provide the same result as adding the two you already have. Each item can be either "On Time" or "Early", right?

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.