Masuk Kelas | Membuat Query dengan Fungsi IIF , OR, AND

Masuk Kelas
21 Apr 202209:20

Summary

TLDRThis tutorial demonstrates how to use the IF logic function in combination with other logical operators, such as OR, to calculate discounts based on item types and quantities. The example focuses on offering a 5% discount for tablet purchases, with additional conditions for quantities above 5. It explains how to structure conditional formulas in spreadsheets, handling both logical operators and mathematical calculations, ensuring users understand how to apply these formulas practically. The tutorial also covers handling data like price adjustments based on discounts and using logical operations with different data types effectively.

Takeaways

  • 😀 The tutorial demonstrates how to use the 'if' logic function in combination with other logical operators such as 'and' and 'or'.
  • 😀 The video provides an example of applying discounts to a tablet purchase when certain conditions are met.
  • 😀 The discount is applied if the product is a tablet, and the quantity is greater than 5.
  • 😀 The speaker uses '5%' or '0.05' as the discount value to illustrate the concept.
  • 😀 Logical operators such as 'and' and 'or' are integrated within the 'if' function to refine the discount condition based on quantity and item type.
  • 😀 A condition is added to apply the discount only when the quantity of the tablet purchased exceeds 5, using 'greater than' logic.
  • 😀 The speaker highlights that logical functions like 'if' can be nested with other operators to create more complex conditions.
  • 😀 An example is given where a discount is only granted if both conditions are true: the item is a tablet and the quantity is above 5.
  • 😀 The speaker explains the use of mathematical formulas within the 'if' function, such as subtracting a discount from the original price.
  • 😀 The tutorial encourages viewers to experiment and apply the concepts to their own data and scenarios for deeper understanding.

Q & A

  • What is the main concept demonstrated in the video?

    -The video demonstrates how to use the 'if' conditional function along with other logical operators, like 'OR', to calculate discounts based on product quantities and types, specifically focusing on a case where a tablet is purchased.

  • What is the discount given for purchasing a tablet according to the example?

    -The discount given for purchasing a tablet is 5%, or 0.05 in decimal form, when the quantity is greater than 5.

  • How does the script handle applying the discount?

    -The script checks if the product is a tablet and if the quantity is greater than 5. If both conditions are met, the discount of 5% is applied. Otherwise, no discount is given.

  • What is the role of the 'OR' operator in this example?

    -The 'OR' operator is used to combine multiple conditions. In this example, it could be used to check if the product is either a tablet or meets some other condition, though it's not fully demonstrated in this particular part of the script.

  • What happens if the quantity of tablets is not greater than 5?

    -If the quantity is not greater than 5, no discount is applied. The script is set to give a discount only when the quantity exceeds 5.

  • What is the mathematical operation used to calculate the price after the discount?

    -The price after the discount is calculated by subtracting the discount from the original price. The formula used is: price - (price * discount).

  • Why does the script use parentheses in the formula for calculating the discount?

    -The parentheses are used to ensure that the discount is calculated first before subtracting it from the original price, following the correct order of operations in mathematics.

  • What is the final price of an item that originally costs 9800 after a 5% discount is applied?

    -The final price after a 5% discount on an item originally costing 9800 would be 9310, as the discount of 490 is subtracted from the original price.

  • What issue does the video mention regarding the output of the discounted price?

    -The video mentions an issue where the discounted price may still show up even if no discount is applied, and it encourages users to try and fix this issue so that only the discounted price appears when applicable.

  • How is the discount applied differently for tablets versus other products?

    -The discount is specifically designed for tablets, and the script ensures that only products with the 'tablet' identifier and a quantity greater than 5 receive the discount. Other products may not receive any discount based on the current logic.

Outlines

plate

Esta sección está disponible solo para usuarios con suscripción. Por favor, mejora tu plan para acceder a esta parte.

Mejorar ahora

Mindmap

plate

Esta sección está disponible solo para usuarios con suscripción. Por favor, mejora tu plan para acceder a esta parte.

Mejorar ahora

Keywords

plate

Esta sección está disponible solo para usuarios con suscripción. Por favor, mejora tu plan para acceder a esta parte.

Mejorar ahora

Highlights

plate

Esta sección está disponible solo para usuarios con suscripción. Por favor, mejora tu plan para acceder a esta parte.

Mejorar ahora

Transcripts

plate

Esta sección está disponible solo para usuarios con suscripción. Por favor, mejora tu plan para acceder a esta parte.

Mejorar ahora
Rate This

5.0 / 5 (0 votes)

Etiquetas Relacionadas
Excel FunctionsDiscount LogicIF FunctionExcel TutorialLogical OperatorsData AnalysisDiscount CalculationExcel TipsMathematical FunctionsProduct DiscountsQuantity-Based Discounts
¿Necesitas un resumen en inglés?