cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

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

Accepted Solutions
Super User
Super User

Re: TOTALYTD BASED ON MULTIPLE FILTERS

Hi @Hyperchef1969

 

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?

2 REPLIES 2
Super User
Super User

Re: TOTALYTD BASED ON MULTIPLE FILTERS

Hi @Hyperchef1969

 

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?

Community Support Team
Community Support Team

Re: TOTALYTD BASED ON MULTIPLE FILTERS

Hi @Hyperchef1969,

 

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.