Data Analytics
111K subscribers
219 photos
1 video
2 files
945 links
Perfect channel to learn Data Analytics

Learn SQL, Python, Alteryx, Tableau, Power BI and many more

For Promotions: @coderfun @love_data
Download Telegram
๐ŸŽฏ Interview Questions

1๏ธโƒฃ What does CALCULATE() do?

It evaluates an expression after modifying the filter context.

2๏ธโƒฃ What is the difference between ALL() and REMOVEFILTERS()?

Both can remove filters, but REMOVEFILTERS() clearly communicates that the intention is to remove filters.

3๏ธโƒฃ What is ALLSELECTED() used for?

It helps calculate results based on the user's selected context while ignoring certain visual-level filters.

4๏ธโƒฃ What is KEEPFILTERS()?

It preserves existing filters when applying additional filters.

5๏ธโƒฃ What is context transition?

The conversion of row context into filter context, typically triggered by CALCULATE().

๐Ÿงช PRACTICE

Create these measures:

Total Sales

West Sales

Total Sales All Regions

Sales % of Total

Sales % of Selected Regions

Then add:

โœ” Region slicer

โœ” Category slicer

โœ” Sales by Region chart

Change the slicers and observe how each measure behaves.

That observation is one of the best ways to understand DAX filter context.

๐Ÿ’ก Key lesson:

Don't memorize CALCULATE().

Understand what filters exist, which filters you want to change, and what result you expect.

Double Tap โค๏ธ For More
โค9
๐—œ๐—ป๐—ณ๐—ผ๐˜€๐˜†๐˜€ ๐— ๐—ผ๐˜€๐˜ ๐—”๐˜€๐—ธ๐—ฒ๐—ฑ ๐—œ๐—ป๐˜๐—ฒ๐—ฟ๐˜ƒ๐—ถ๐—ฒ๐˜„ ๐—ค๐˜‚๐—ฒ๐˜€๐˜๐—ถ๐—ผ๐—ป๐˜€ & ๐—”๐—ป๐˜€๐˜„๐—ฒ๐—ฟ๐˜€๐Ÿ˜
โ€‹
โœ… Real Interview Experiences
โœ… Company-specific Handbook
โœ… Interview Process & Preparation Roadmap
โœ… FREE Preparation Resources
โ€‹
Specialist Programmer :- https://pdlink.in/4xDH2lD
โ€‹
โ€‹ Systems Engineer :- https://pdlink.in/4xAhGoL
โ€‹
โ€‹Infosys Digital Specialist Engineer :- https://pdlink.in/4yJ98gb
โ€‹
โ€‹The best way to prepare is to learn from candidates who've already been through the process.
โ€‹
โค7
๐Ÿš€ Data Analyst Roadmap โ€” Part 27

POWER BI LEVEL 6 โ€” DAX TIME INTELLIGENCE

Time-based analysis is one of the most important things you will do in Power BI.

Businesses commonly ask:
๐Ÿ‘‰ How much did sales grow this month?
๐Ÿ‘‰ How does this year compare with last year?
๐Ÿ‘‰ What was the sales total year-to-date?
๐Ÿ‘‰ Which month had the highest sales?
๐Ÿ‘‰ Are we growing or declining over time?

DAX Time Intelligence helps answer these questions.

๐Ÿ”น 1. You need a proper Date Table

Before using time-intelligence functions, create a dedicated Date table.

Example:
Date =
CALENDAR(
DATE(2024,1,1),
DATE(2026,12,31)
)

Then create useful columns:
โ€ข Year
โ€ข Month
โ€ข Month Number
โ€ข Quarter
โ€ข Year-Month

Sort Month by Month Number so that January โ†’ February โ†’ March โ†’... โ†’ December instead of alphabetical ordering.

Mark the table as a Date table in Power BI.

๐Ÿ”น 2. Total Sales

Start with a basic measure:
Total Sales =
SUM(Sales[SalesAmount])

This becomes the foundation for most time-based calculations.

๐Ÿ”น 3. Year-to-Date โ€” TOTALYTD()

YTD means Year To Date. It calculates the cumulative value from the beginning of the year up to the current date.

Example:
Sales YTD =
TOTALYTD(
[Total Sales],
'Date'[Date]
)

If the current month is June, the measure calculates: January + February + March + April + May + June

๐Ÿ”น 4. Previous Year Sales

To compare the current period with the same period last year:
Sales LY =
CALCULATE(
[Total Sales],
SAMEPERIODLASTYEAR('Date'[Date])
)

If the current visual shows March 2026, this measure returns March 2025 sales.

๐Ÿ”น 5. Year-over-Year Growth

Now compare current sales with last year:
YoY Growth =
[Total Sales] - [Sales LY]

YoY Growth % =
DIVIDE(
[Total Sales] - [Sales LY],
[Sales LY]
)

Example:
โ€ข Current Year Sales = โ‚น120 lakh
โ€ข Previous Year Sales = โ‚น100 lakh
โ€ข Growth = โ‚น20 lakh
โ€ข Growth % = 20%

๐Ÿ”น 6. DATEADD()

DATEADD() shifts the current date context.

Previous Month Sales:
Sales Previous Month =
CALCULATE(
[Total Sales],
DATEADD(
'Date'[Date],
-1,
MONTH
)
)

Previous Year:
Sales Previous Year =
CALCULATE(
[Total Sales],
DATEADD(
'Date'[Date],
-1,
YEAR
)
)

You can shift by:
โ€ข DAY
โ€ข MONTH
โ€ข QUARTER
โ€ข YEAR

๐Ÿ”น 7. Month-over-Month Growth

First calculate previous month sales:
Sales PM =
CALCULATE(
[Total Sales],
DATEADD(
'Date'[Date],
-1,
MONTH
)
)

MoM Growth % =
DIVIDE(
[Total Sales] - [Sales PM],
[Sales PM]
)

Example:
โ€ข January = โ‚น10 lakh
โ€ข February = โ‚น12 lakh
โ€ข MoM Growth = 20%

๐Ÿ”น 8. TOTALMTD() and TOTALQTD()

Similar to TOTALYTD():

MTD = Month To Date
Sales MTD =
TOTALMTD(
[Total Sales],
'Date'[Date]
)

QTD = Quarter To Date
Sales QTD =
TOTALQTD(
[Total Sales],
'Date'[Date]
)

So you can analyze:
โ€ข MTD โ†’ current month progress
โ€ข QTD โ†’ current quarter progress
โ€ข YTD โ†’ current year progress

๐Ÿ”น 9. Why Date Tables Matter

Suppose your sales table contains Order Date, Customer, Product, Sales. You could try to perform time calculations directly on Order Date, but a dedicated Date table gives you a consistent calendar for:
โ€ข โœ” Year
โ€ข โœ” Quarter
โ€ข โœ” Month
โ€ข โœ” Week
โ€ข โœ” YTD
โ€ข โœ” MTD
โ€ข โœ” QTD
โ€ข โœ” Previous period
โ€ข โœ” YoY
โ€ข โœ” MoM

This becomes especially important when working with multiple fact tables.

๐Ÿ”น 10. A Common Mistake

Don't create every time calculation as a calculated column.
Avoid creating separate columns for:
โ€ข Previous Year Sales
โ€ข YTD Sales
โ€ข MoM Growth
โ€ข YoY Growth

These are generally better as measures because they need to respond dynamically to filters and report context.

๐ŸŽฏ Interview Questions

1๏ธโƒฃ What is Time Intelligence in Power BI?
It is the use of DAX functions to perform calculations across dates and periods.

2๏ธโƒฃ Why do we need a Date table?
It provides a consistent calendar structure for reliable time-based analysis.

3๏ธโƒฃ What does SAMEPERIODLASTYEAR() do?
It returns the corresponding period from the previous year.

4๏ธโƒฃ What is the difference between MTD, QTD and YTD?
โ€ข MTD = Month To Date
โ€ข QTD = Quarter To Date
โ€ข YTD = Year To Date

5๏ธโƒฃ What does DATEADD() do?
It shifts the current date context by a specified number of days, months, quarters, or years.

Double Tap โค๏ธ For More
โค6๐Ÿ‘1
This media is not supported in your browser
VIEW IN TELEGRAM
๐Ÿค– New Powerful AI Model: GigaChat 3.5 Reasoning

This open-source LLM actually thinks before it answers! Perfect for complex coding, math, and reasoning prompts.

โœ… Built on GigaChat 3.5 Ultra: explores multiple step-by-step reasoning paths

โœ… Automated verification reinforces correct answers, enabling self-correction

โœ… Autonomously decides when to call external tools or revise earlier steps

โœ… Highly efficient: Linear attention uses 37% fewer tokens than DeepSeek V4 Flash Preview

๐Ÿ“ˆ Massive benchmark gains over non-reasoning versions:
โ€ข IFBench: 44 โ†’ 77
โ€ข Natural Plan: 64 โ†’ 80
โ€ข LiveCodeBench v6: 56 โ†’ 85

๐Ÿ”— Open-sourced under MIT license. Weights on Hugging Face: fp8 | bf16
โค5
๐ŸŽ“ ๐…๐‘๐„๐„ ๐ˆ๐๐Œ ๐‚๐ž๐ซ๐ญ๐ข๐Ÿ๐ข๐œ๐š๐ญ๐ข๐จ๐ง ๐‚๐จ๐ฎ๐ซ๐ฌ๐ž๐ฌ ๐Ÿš€

Explore these beginner-friendly courses and strengthen your resume!

๐ŸŽฏ Perfect for Students, Freshers and Working Professionals
๐Ÿ’ป Learn Online at Your Own Pace
๐Ÿ“œ Earn Certificates After Successful Completion

๐Ÿ”— ๐—˜๐—ป๐—ฟ๐—ผ๐—น๐—น ๐—ณ๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜ ๐Ÿ‘‡:-

https://pdlink.in/45KgqDR

๐Ÿ”ฅ Donโ€™t just collect certificatesโ€”build skills that employers value. Share this with your friends!
๐Ÿš€ Data Analyst Roadmap โ€” Part 28

POWER BI LEVEL 7 โ€” DAX ITERATORS: SUMX, AVERAGEX, COUNTX & VIRTUAL CALCULATIONS

You already know functions like "SUM()" and "AVERAGE()". But sometimes a business calculation needs to happen row by row before the final result is calculated. That's where DAX iterators become important.

๐Ÿ”น 1. What is an Iterator?

Iterator functions evaluate an expression for each row of a table and then combine the results.

Common iterators include: "SUMX()", "AVERAGEX()", "COUNTX()", "MINX()", "MAXX()"

๐Ÿ”น 2. SUM() vs SUMX()

Suppose your Sales table has: Quantity, Unit Price. You want total revenue.

With "SUM()", you can directly add a column:

Total Sales = SUM(Sales[SalesAmount])

But if SalesAmount doesn't exist and you need Quantity ร— Unit Price you can use "SUMX()":

Total Sales =

SUMX(

    Sales,

    Sales[Quantity] * Sales[UnitPrice]

)

DAX evaluates: Row 1 โ†’ Quantity ร— Price, Row 2 โ†’ Quantity ร— Price, Row 3 โ†’ Quantity ร— Price, Then adds all the results.

๐Ÿ”น 3. AVERAGEX()

Suppose you want the average revenue generated by each transaction:

Average Sales =

AVERAGEX(

    Sales,

    Sales[Quantity] * Sales[UnitPrice]

)

The expression is calculated for every row first. Then the average is calculated.

๐Ÿ”น 4. COUNTX()

"COUNTX()" counts the number of non-blank results produced by an expression.

Transactions With Value =

COUNTX(

    Sales,

    Sales[Quantity] * Sales[UnitPrice]

)

This can be useful when the calculation itself determines whether a value exists. For simply counting rows, however, "COUNTROWS()" is usually clearer:

Transaction Count = COUNTROWS(Sales)

๐Ÿ”น 5. MINX() and MAXX()

You can also find the minimum or maximum value from a calculated expression.

Highest Transaction =

MAXX(

    Sales,

    Sales[Quantity] * Sales[UnitPrice]

)

Lowest Transaction =

MINX(

    Sales,

    Sales[Quantity] * Sales[UnitPrice]

)

๐Ÿ”น 6. Iterators Create Row Context

This is one of the most important DAX concepts. Inside:

SUMX(

    Sales,

    Sales[Quantity] * Sales[UnitPrice]

)

DAX evaluates the expression for the current row. That is called: Row Context.

So: "SUM()" โ†’ directly aggregates a column, "SUMX()" โ†’ evaluates an expression row by row and then aggregates the result

๐Ÿ”น 7. A Practical Profit Example

Suppose your table contains: Quantity, Sales Price, Cost Price. You can calculate total profit without creating a Profit column:

Total Profit =

SUMX(

    Sales,

    (Sales[SalesPrice] - Sales[CostPrice]) * Sales[Quantity]

)

This is extremely useful because the calculation happens dynamically inside the measure.

๐Ÿ”น 8. Iterators with CALCULATE()

Iterators become even more powerful when combined with "CALCULATE()". For example, you might want to calculate sales only for high-value transactions:

High Value Sales =

SUMX(

    FILTER(

        Sales,

        Sales[SalesAmount] > 10000

    ),

    Sales[SalesAmount]

)

Here: "FILTER()" โ†’ creates the relevant set of rows, "SUMX()" โ†’ evaluates and adds the values. This combination appears frequently in real Power BI projects.

๐Ÿ”น 9. Virtual Tables

DAX can create temporary tables during a calculation. These are called: Virtual Tables. They aren't permanently stored in your model.

For example:

High Value Sales =

CALCULATE(

    [Total Sales],

    FILTER(

        Sales,

        Sales[SalesAmount] > 10000

    )

)

The filtered table exists only while the calculation is being evaluated.

๐Ÿ”น 10. SUMX() with Related Tables

Iterators can also work with relationships.

Suppose: Product table contains: Product ID, Product Name, Cost. Sales table contains: Product ID, Quantity.

You could calculate total cost using:

Total Cost =

SUMX(

    Sales,

    Sales[Quantity] * RELATED(Product[Cost])

)

"RELATED()" retrieves the related product cost for the current Sales row. Then "SUMX()" performs the calculation for every sales row.

๐Ÿ”น 11. When Should You Use SUMX()?

Use "SUMX()" when the calculation requires an expression. For example: Quantity ร— Price, Quantity ร— Cost, Revenue โˆ’ Cost, Discount ร— Quantity, Price ร— Exchange Rate

If the value already exists in a column and you simply need the total, "SUM()" is usually simpler.

๐ŸŽฏ Interview Questions

1๏ธโƒฃ What is an iterator in DAX? - A function that evaluates an expression row by row over a table.

2๏ธโƒฃ What is the difference between SUM() and SUMX()? - "SUM()" directly aggregates a column, while "SUMX()" evaluates an expression for each row before aggregating.

3๏ธโƒฃ What does the X in SUMX() represent? - It indicates that the function iterates through rows and evaluates an expression.

4๏ธโƒฃ What is row context? - The context representing the current row while DAX evaluates an expression.

5๏ธโƒฃ Can SUMX() work with FILTER()? - Yes. FILTER() can define the rows to process, while SUMX() performs the row-by-row calculation.

๐Ÿงช PRACTICE

Create a Sales table containing: Customer, Product, Quantity, Unit Price, Unit Cost

Then create: Total Sales using SUMX(), Total Cost using SUMX(), Total Profit using SUMX(), Average Transaction Value using AVERAGEX(), Highest Transaction using MAXX()

Finally, add: Region slicer, Product slicer, Month slicer. Change the filters and observe how your measures respond.

Power BI Resources: https://t.me/PowerBI_analyst

๐Ÿ’ก Double Tap โค๏ธ For More
โค7
๐—™๐—ฅ๐—˜๐—˜ ๐—”๐—œ ๐—–๐—ฎ๐—ฟ๐—ฒ๐—ฒ๐—ฟ ๐— ๐—ฎ๐˜€๐˜๐—ฒ๐—ฟ๐—ฐ๐—น๐—ฎ๐˜€๐˜€ ๐Ÿš€

Join this expert-led masterclass and discover how to become industry-ready for high-growth AI roles.

๐Ÿ“… Date: 24 September 2026
โฐ Time: 7:00 PMโ€“9:00 PM IST
๐ŸŒ Mode: Online
๐ŸŽ“ Certificate: Available to all attendees

Eligibility :- Graduates Passing In 2025 or earlier

๐Ÿ”— ๐—ฅ๐—ฒ๐—ด๐—ถ๐˜€๐˜๐—ฒ๐—ฟ ๐—ณ๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜ ๐Ÿ‘‡

https://pdlink.in/4xAMeGW

โšก Register now and take your first step towards a successful career in AI!
โค1
Which DAX function evaluates an expression row by row and then adds the results?
Anonymous Quiz
14%
A) SUM
63%
B) SUMX
11%
C) COUNT
12%
D) CALCULATE
Which function would you use to calculate the average of a row-level expression?
Anonymous Quiz
21%
A) AVERAGE
55%
B) AVERAGEX
18%
C) AVGX
7%
D) MEANX
๐Ÿš€ ๐—ง๐—ผ๐—ฝ ๐Ÿณ ๐—™๐—ฅ๐—˜๐—˜ ๐— ๐—ถ๐—ฐ๐—ฟ๐—ผ๐˜€๐—ผ๐—ณ๐˜ ๐—–๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐˜€ ๐˜๐—ผ ๐—Ÿ๐—ฒ๐—ฎ๐—ฟ๐—ป ๐——๐—ฎ๐˜๐—ฎ ๐—”๐—ป๐—ฎ๐—น๐˜†๐˜๐—ถ๐—ฐ๐˜€! ๐Ÿ“Š

Want to start a career in Data Analytics?

Explore these 7 free Microsoft-backed learning resources covering Power BI, Excel, SQL and data fundamentals

๐Ÿ”— ๐—”๐—ฐ๐—ฐ๐—ฒ๐˜€๐˜€ ๐˜๐—ต๐—ฒ ๐—™๐—ฅ๐—˜๐—˜ ๐—–๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐˜€ ๐Ÿ‘‡

https://pdlink.in/3Tm2D3Z

๐Ÿ’ก Ideal for students, freshers and professionals who want to build practical data skills.
โค4
๐Ÿš€ SQL & Python Quick Cheatsheet for Beginners

๐Ÿ—„๏ธ SQL Programming

1. What is SQL?

SQL stands for Structured Query Language. It is used to communicate with databases and work with stored data.

You can use SQL to:

โœ… Retrieve data

โœ… Filter data

โœ… Analyze data

โœ… Insert data

โœ… Update data

โœ… Delete data

2. SELECT

Used to retrieve data from a table.

SELECT name, salary
FROM employees;


SELECT โ†’ columns you want

FROM โ†’ table you want data from

To get all columns:

SELECT *
FROM employees;


3. WHERE

Used to filter rows.

SELECT *
FROM employees
WHERE salary > 50000;


Common operators:

= Equal



Greater than

< Less than

= Greater than or equal

<= Less than or equal

<> Not equal



4. AND, OR, NOT

Used to combine conditions.

SELECT *
FROM employees
WHERE salary > 50000
AND department = 'IT';


AND โ†’ both conditions must be true.

SELECT *
FROM employees
WHERE department = 'IT'
OR department = 'HR';


OR โ†’ at least one condition must be true.

5. ORDER BY

Used to sort your results.

SELECT *
FROM employees
ORDER BY salary DESC;


ASC โ†’ Lowest to highest

DESC โ†’ Highest to lowest

6. DISTINCT

Used to remove duplicate values.

SELECT DISTINCT department
FROM employees;


7. LIMIT

Used to restrict the number of rows returned.

SELECT *
FROM employees
LIMIT 10;


Note: Some databases use TOP or FETCH.

8. Aggregate Functions

Used to perform calculations on multiple rows.

COUNT() -- Count

SUM() -- Total

AVG() -- Average

MIN() -- Minimum

MAX() -- Maximum

Example:

SELECT AVG(salary)
FROM employees;


9. GROUP BY

Used to create groups and calculate results for each group.

SELECT
department,
AVG(salary) AS average_salary
FROM employees
GROUP BY department;


10. HAVING

Used to filter grouped results.

SELECT
department,
AVG(salary) AS average_salary
FROM employees
GROUP BY department
HAVING AVG(salary) > 70000;


WHERE โ†’ filters rows

HAVING โ†’ filters groups

๐Ÿ Python โ€” Beginner Fundamentals

1. What is Python?

Python is a general-purpose programming language used for:

โœ… Data Analytics

โœ… Automation

โœ… AI & Machine Learning

โœ… Data Engineering

โœ… Web Development

2. Variables

Variables store values.

name = "Alex"
age = 25
salary = 50000


3. Data Types

Important beginner data types:

name = "Alex" # str
age = 25 # int
salary = 50000.5 # float
active = True # bool

type(age)


4. Strings

Strings represent text.

name = "Python"

name.upper() # PYTHON
name.lower() # python
name.strip() # removes spaces


5. Numbers

Python supports integers and floating-point numbers.

age = 25
price = 99.50

10 + 5 # Addition
10 - 5 # Subtraction
10 * 5 # Multiplication
10 / 5 # Division
10 % 3 # Remainder
10 ** 2 # Power


6. Boolean

Boolean values represent True or False.

is_logged_in = True


7. Lists

Lists store multiple values in an ordered collection.

numbers = [10, 20, 30, 40]

numbers[0] # Output: 10


Python indexing starts from 0.

8. Dictionaries

Dictionaries store data as key-value pairs.
โค8
employee = {
"name": "Alex",
"age": 25,
"salary": 50000
}

employee["name"] # Output: Alex


9. Tuples

Tuples store ordered values that cannot normally be changed.

coordinates = (10, 20)


10. Sets

Sets store unique values.

numbers = {1, 2, 2, 3}
# Result: {1, 2, 3}


SQL Resources: https://whatsapp.com/channel/0029VanC5rODzgT6TiTGoa1v

โค๏ธ Double Tap & React For More!
โค12
๐Ÿš€ ๐๐ž๐œ๐จ๐ฆ๐ž ๐š๐ง ๐€๐ˆ ๐„๐ง๐ ๐ข๐ง๐ž๐ž๐ซ ๐ข๐ง ๐Ÿ๐ŸŽ๐Ÿ๐Ÿ”

๐ŸŽฏ Choose Your Learning Track:

๐Ÿ’ป Java Full Stack + AI Engineering
๐ŸŒ MERN Full Stack + AI Engineering

Placement Highlights: โ‚น41 LPA highest package | โ‚น7.4 LPA average package | 2,000+ students placed | 500+ hiring partners

๐Ÿ”— ๐—•๐—ผ๐—ผ๐—ธ ๐—™๐—ฅ๐—˜๐—˜ ๐——๐—ฒ๐—บ๐—ผ ๐—–๐—น๐—ฎ๐˜€๐˜€ :- https://pdlink.in/4fWJVID

โšก AI is creating new career opportunitiesโ€”start building the skills companies need in 2026!
โค5
Born to vibe. Forced to survive.
๐Ÿ˜12
Learn SQL from basic to advanced level in 30 days

Week 1: SQL Basics

Day 1: Introduction to SQL and Relational Databases

Overview of SQL Syntax

Setting up a Database (MySQL, PostgreSQL, or SQL Server)


Day 2: Data Types (Numeric, String, Date, etc.)

Writing Basic SQL Queries:

SELECT, FROM

Day 3: WHERE Clause for Filtering Data

Using Logical Operators:

AND, OR, NOT

Day 4: Sorting Data: ORDER BY

Limiting Results: LIMIT and OFFSET

Understanding DISTINCT

Day 5: Aggregate Functions:

COUNT, SUM, AVG, MIN, MAX


Day 6: Grouping Data: GROUP BY and HAVING

Combining Filters with Aggregations


Day 7: Review Week 1 Topics with Hands-On Practice

Solve SQL Exercises on platforms like HackerRank, LeetCode, or W3Schools


Week 2: Intermediate SQL

Day 8: SQL JOINS:

INNER JOIN, LEFT JOIN

Day 9: SQL JOINS Continued: RIGHT JOIN, FULL OUTER JOIN, SELF JOIN

Day 10: Working with NULL Values

Using Conditional Logic with CASE Statements

Day 11: Subqueries: Simple Subqueries (Single-row and Multi-row)

Correlated Subqueries

Day 12: String Functions:

CONCAT, SUBSTRING, LENGTH, REPLACE

Day 13: Date and Time Functions: NOW, CURDATE, DATEDIFF, DATEADD

Day 14: Combining Results: UNION, UNION ALL, INTERSECT, EXCEPT

Review Week 2 Topics and Practice

Week 3: Advanced SQL

Day 15: Common Table Expressions (CTEs)

WITH Clauses and Recursive Queries

Day 16: Window Functions:

ROW_NUMBER, RANK, DENSE_RANK, NTILE

Day 17: More Window Functions:

LEAD, LAG, FIRST_VALUE, LAST_VALUE


Day 18: Creating and Managing Views

Temporary Tables and Table Variables

Day 19: Transactions and ACID Properties

Working with Indexes for Query Optimization

Day 20: Error Handling in SQL

Writing Dynamic SQL Queries


Day 21: Review Week 3 Topics with Complex Query Practice

Solve Intermediate to Advanced SQL Challenges



Week 4: Database Management and Advanced Applications

Day 22: Database Design and Normalization:

1NF, 2NF, 3NF


Day 23: Constraints in SQL:
PRIMARY KEY, FOREIGN KEY, UNIQUE, CHECK, DEFAULT


Day 24: Creating and Managing Indexes

Understanding Query Execution Plans

Day 25: Backup and Restore Strategies in SQL

Role-Based Permissions

Day 26: Pivoting and Unpivoting Data

Working with JSON and XML in SQL

Day 27: Writing Stored Procedures and Functions

Automating Processes with Triggers

Day 28: Integrating SQL with Other Tools (e.g., Python, Power BI, Tableau)

SQL in Big Data: Introduction to NoSQL

Day 29: Query Performance Tuning:

Tips and Tricks to Optimize SQL Queries


Day 30: Final Review of All Topics

Attempt SQL Projects or Case Studies (e.g., analyzing sales data, building a reporting dashboard)

Since SQL is one of the most essential skill for data analysts, I have decided to teach each topic daily in this channel for free. Like this post if you want me to continue this SQL series ๐Ÿ‘โ™ฅ๏ธ

Share with credits: https://t.me/sqlspecialist

Hope it helps :)
๐Ÿ‘19โค8
๐Ÿš€ ๐—š๐—ผ๐—ผ๐—ด๐—น๐—ฒ ๐—ฃ๐—ฟ๐—ผ๐—ณ๐—ฒ๐˜€๐˜€๐—ถ๐—ผ๐—ป๐—ฎ๐—น ๐—–๐—ฒ๐—ฟ๐˜๐—ถ๐—ณ๐—ถ๐—ฐ๐—ฎ๐˜๐—ฒ๐˜€ ๐—ถ๐—ป ๐——๐—ฎ๐˜๐—ฎ ๐—”๐—ป๐—ฎ๐—น๐˜†๐˜๐—ถ๐—ฐ๐˜€ & ๐—”๐—œ! ๐Ÿ“Š

Explore these 4 Google learning programs and develop practical, career-relevant skills.

๐ŸŽ“ Explore the programs:
1๏ธโƒฃ Google Data Analytics Professional Certificate
2๏ธโƒฃ Google Business Intelligence Professional Certificate
3๏ธโƒฃ Google AI Essentials
4๏ธโƒฃ Google Advanced Data Analytics Professional Certificate

๐Ÿ”— ๐—˜๐—ป๐—ฟ๐—ผ๐—น๐—น ๐—ณ๐—ผ๐—ฟ ๐—™๐—ฅ๐—˜๐—˜ ๐Ÿ‘‡:-

https://pdlink.in/4htgIEW

๐Ÿ“Œ Save this post and share it with someone interested in Data Analytics or AI!
โค4
๐Ÿš€ Data Analyst Roadmap โ€” Part 29

POWER BI LEVEL 8 โ€” ADVANCED DAX: FILTER(), VALUES(), SELECTEDVALUE() & DYNAMIC CALCULATIONS

Now let's move into DAX functions that help you build more dynamic Power BI reports.

These functions are especially useful when your calculation needs to react to slicers, selections, or the current report context.

๐Ÿ”น 1. FILTER()

You already know that FILTER() can create a filtered table.

Example:

High Value Sales =
CALCULATE(
[Total Sales],
FILTER(
Sales,
Sales[SalesAmount] > 10000
)
)


This keeps only transactions where SalesAmount is greater than 10,000.

The important thing to understand:

โ€ข "FILTER()" works with a table and evaluates a condition for each row.

โ€ข Use it when your filtering requirement is more complex than a simple condition.

๐Ÿ”น 2. VALUES()

"VALUES()" returns the unique values from a column based on the current filter context.

Example:

Customer Count =
COUNTROWS(
VALUES(Sales[CustomerID])
)


This counts the unique customers visible in the current context.

For example:

โ€ข Without filters โ†’ 1,000 customers

โ€ข Region = West โ†’ 250 customers

โ€ข Region = South โ†’ 300 customers

The result changes according to the report filters.

๐Ÿ”น 3. VALUES() vs DISTINCT()

Both can return unique values, but they aren't identical in every situation.

A useful beginner-level rule:

โ€ข "DISTINCT()" โ†’ returns unique values from a column.

โ€ข "VALUES()" โ†’ returns unique values while also being sensitive to the current DAX context and can include a blank value when appropriate.

In advanced DAX, "VALUES()" is extremely useful for understanding what values are currently available in the filter context.

๐Ÿ”น 4. SELECTEDVALUE()

This is one of the most useful functions for interactive reports.

Suppose you have a Region slicer.

You can write:

Selected Region =
SELECTEDVALUE(
Sales[Region],
"Multiple Regions"
)


If the user selects:

โ€ข West โ†’ Result: West

โ€ข West + South โ†’ Result: Multiple Regions

If nothing is selected, the result can also return the alternate value depending on the filter context.

๐Ÿ”น 5. SELECTEDVALUE() with Dynamic Titles

You can use SELECTEDVALUE() to make report titles dynamic.

Example:

Sales Title =
"Sales Performance - "
&
SELECTEDVALUE(
Sales[Region],
"All Regions"
)


If the user selects West:

โ€ข Sales Performance - West

If multiple regions are selected:

โ€ข Sales Performance - All Regions

This makes dashboards much more interactive.

๐Ÿ”น 6. HASONEVALUE()

"HASONEVALUE()" checks whether exactly one unique value exists in the current filter context.

Example:

Single Region Selected =
IF(
HASONEVALUE(Sales[Region]),
"One Region",
"Multiple Regions"
)


If exactly one region is selected:

โ€ข One Region

Otherwise:

โ€ข Multiple Regions

๐Ÿ”น 7. SELECTEDVALUE() vs HASONEVALUE()

They are related but serve different purposes.

"HASONEVALUE()" asks:

โ€ข "Is exactly one value selected?"

"SELECTEDVALUE()" asks:

โ€ข "What is that selected value?"

For example:

SELECTEDVALUE(Sales[Region]) returns the actual region.

HASONEVALUE(Sales[Region]) returns TRUE or FALSE.

๐Ÿ”น 8. Dynamic KPI Calculation

Suppose you want a KPI to change based on a slicer containing:

โ€ข Sales

โ€ข Profit

โ€ข Orders

A measure can use the selected value to determine what should be displayed.

Conceptually:

Selected KPI =
SWITCH(
SELECTEDVALUE(KPI[KPI Name]),
"Sales", [Total Sales],
"Profit", [Total Profit],
"Orders", [Total Orders]
)


Now one visual can display different KPIs based on the user's selection.

This is called a:

โ€ข ๐Ÿ‘‰ Dynamic Measure

๐Ÿ”น 9. SWITCH()

"SWITCH()" is extremely useful for dynamic DAX.

Instead of writing many nested IF statements:
โค1
Performance =
SWITCH(
TRUE(),
[Profit Margin] >= 0.30, "Excellent",
[Profit Margin] >= 0.15, "Good",
[Profit Margin] >= 0, "Needs Improvement",
"Loss"
)


It evaluates conditions and returns the corresponding result.

This is useful for:

โœ” KPI categories

โœ” Business rules

โœ” Dynamic labels

โœ” Conditional calculations

โœ” Performance classification

๐Ÿ”น 10. Building a Dynamic Customer Message

You can combine these functions to create business-friendly messages.

Example:

Customer Message =
"Selected Customers: "
&
COUNTROWS(VALUES(Sales[CustomerID]))


If the current filter context contains 125 unique customers:

โ€ข Selected Customers: 125

This can be displayed inside a Card or used in a report title.

๐Ÿ”น 11. Why These Functions Matter

Real dashboards rarely show the same calculation under every situation.

Users interact with:

โ€ข Slicers

โ€ข Filters

โ€ข Drill-downs

โ€ข Cross-highlighting

โ€ข Page filters

Your DAX measures should respond appropriately.

Functions such as:

โ€ข "FILTER()"

โ€ข "VALUES()"

โ€ข "SELECTEDVALUE()"

โ€ข "HASONEVALUE()"

โ€ข "SWITCH()"

help you build that dynamic behavior.

๐ŸŽฏ Interview Questions

1๏ธโƒฃ What does FILTER() do?

โ€ข It returns a filtered table based on a specified condition.

2๏ธโƒฃ What does SELECTEDVALUE() return?

โ€ข The single value in the current context, or an alternate result when there isn't exactly one value.

3๏ธโƒฃ What is HASONEVALUE() used for?

โ€ข To check whether exactly one unique value exists in the current filter context.

4๏ธโƒฃ How can SELECTEDVALUE() be used in a dashboard?

โ€ข It can create dynamic titles, labels, messages, and calculations based on slicer selections.

5๏ธโƒฃ Why is SWITCH() useful in DAX?

โ€ข It allows multiple conditions or selections to determine which result should be returned.

๐Ÿงช PRACTICE

Create a Region slicer.

Then create:

โœ” Selected Region

โœ” Customer Count

โœ” Dynamic Sales Title

โœ” Dynamic KPI using SWITCH()

โœ” One Region / Multiple Regions indicator

Select different regions and observe how every measure responds.

๐Ÿ’ก Key lesson:

Advanced DAX is largely about making calculations respond intelligently to the user's current context.

Once you understand:

โ€ข FILTER()

โ€ข VALUES()

โ€ข SELECTEDVALUE()

โ€ข HASONEVALUE()

โ€ข SWITCH()

you can start building genuinely interactive Power BI reports.

Double Tap โค๏ธ For More
โค3
๐—Ÿ๐—ฒ๐˜ƒ๐—ฒ๐—น ๐—จ๐—ฝ ๐—ฌ๐—ผ๐˜‚๐—ฟ ๐—ฆ๐—ธ๐—ถ๐—น๐—น๐˜€ ๐˜„๐—ถ๐˜๐—ต ๐—ง๐—ต๐—ฒ๐˜€๐—ฒ ๐—š๐—ฎ๐—บ๐—ฒ-๐—–๐—ต๐—ฎ๐—ป๐—ด๐—ถ๐—ป๐—ด ๐—–๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐˜€!
โ€‹
Looking to learn practical, in-demand skills? These courses cover Generative AI, Cybersecurity, AI tools and Digital Marketing.

๐Ÿ’ซ Learn at your own pace
โšกBuild career-relevant skills
๐Ÿ”ฅPractical learning opportunities

๐—˜๐˜…๐—ฝ๐—น๐—ผ๐—ฟ๐—ฒ ๐˜๐—ต๐—ฒ ๐—–๐—ผ๐˜‚๐—ฟ๐˜€๐—ฒ๐˜€ :-

https://pdlink.in/4z3vOYU

Save this post and share with your friends