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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Hyperchef1969
Helper V
Helper V

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
Super User
Super User

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?

View solution in original post

2 REPLIES 2
v-jiascu-msft
Employee
Employee

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.
AlB
Super User
Super User

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?

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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