&& and ||

cajste

Board Regular
Joined
Oct 22, 2012
Messages
67
I'm working with the formula below, wanting to include Kst 802 and 804-823 in the measure, but the formula only includes the [Driver cost Staffing] for Kst=802 and not for Kst interval 804-823. Why is that, what am I not doing right?

Brgds,
Caj

CALCULATE([Driver cost Staffing];dim_Kst[Kst]=802||dim_Kst[Kst]<=804&&dim_Kst[Kst]>=823)
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
I am assuming the ; is just a typo, otherwise that should be a ,.

Try putting a set of () around the && statement for 804-823 for this format: A || (B && C). Also, I believe your <> are reversed. You want Kst >= 804 (greater than or equal to) and Kst <= 823 (less than or equal to).
 
Last edited:
Upvote 0
Thanks, that made the difference!

No typo, the swedish version of Excel uses different characters in a few cases.
 
Upvote 0

Forum statistics

Threads
1,223,942
Messages
6,175,544
Members
452,652
Latest member
eduedu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top