DAX

External Article

DAX CASE Statement Functionality with IF, SWITCH and SWITCH True

  • Article

The CASE expression is one of the most valuable tools in your T-SQL toolbox. I use it in almost every query I write. However, there isn't a direct equivalent of CASE in DAX. Since it's a different language entirely, I don't expect it. As my grandmother used to say, I am not surprised, just disappointed. If you don't know, DAX (Data Analysis Expressions) is a language for creating custom calculations and aggregations in Power Pivot, Power BI, and other data analysis tools. Two functions in DAX come close to replicating the functionality but come with limitations. Which one of these functions should you use? Please stay tuned.

2023-04-03

Stairway to DAX and Power BI

Stairway to DAX and Power BI - Level 17: Time Intelligence Functions: The DAX DATEADD() Function

  • Stairway Step

Business Intelligence Architect, Analysis Services Maestro, and author Bill Pearson introduces the DAX DATEADD() function, discussing its syntax, uses and operation. He then provides hands-on exposure to DATEADD(), focusing largely upon a popular use in creating prior-period values at multiple Date hierarchy levels.

You rated this post out of 5. Change rating

2024-01-16 (first published: )

2,376 reads

Stairway to DAX and Power BI

Stairway to DAX and Power BI - Level 16: The DAX ALLEXCEPT() Function

  • Stairway Step

Business Intelligence Architect, Analysis Services Maestro, and author Bill Pearson introduces the DAX ALLEXCEPT() function, discussing its syntax, uses and operation. He then provides hands-on exposure to ALLEXCEPT(), focusing largely upon its most popular use in removing filters from all columns in a table - except the filters we specify.

5 (1)

You rated this post out of 5. Change rating

2024-01-16 (first published: )

4,548 reads

Stairway to DAX and Power BI

Stairway to DAX and Power BI - Level 15: The DAX ALLSELECTED() Function

  • Stairway Step

Business Intelligence Architect, Analysis Services Maestro, and author Bill Pearson introduces the DAX ALLSELECTED() function, discussing its syntax, uses and operation. He then provides hands-on exposure to ALLSELECTED(), focusing largely upon its most popular use in supporting “visual totals” in Power BI.

4.5 (4)

You rated this post out of 5. Change rating

2024-01-16 (first published: )

3,396 reads

SQLServerCentral Article

How to override Date Filters in Power BI

  • Article

Problem A few weeks back, I got a request from a client of mine who had a very special requirement. They wanted to display values for a specific period in the past based on the selected dates in the Power BI report. Let us assume that if we select 30 June 2020, the report has to […]

You rated this post out of 5. Change rating

2020-08-17

7,814 reads

Stairway to DAX and Power BI

Stairway to DAX and Power BI - Level 14: DAX CALCULATE() Function: The Basics

  • Stairway Step

Business Intelligence Architect, Analysis Services Maestro, eight-year Microsoft Data Platform MVP and author Bill Pearson introduces the DAX CALCULATE() function, discussing its syntax, basic uses and operation. He then provides hands-on exposure to CALCULATE(), focusing largely upon its most basic uses in evaluating an expression in a context that is modified by specified filters.

5 (1)

You rated this post out of 5. Change rating

2024-01-16 (first published: )

7,543 reads

Blogs

Degrees and Trade Schools

By

Can we normalize a couple of things? 1 – Trade Schools. Back in the...

Unlock the Power of Your Data: From Basic to Advanced Data Analysis

By

Data isn't just about numbers and spreadsheets. It holds stories, patterns, and the answers...

Attacking the Weakest Link

By

When I look at a system and think about its security model, the first...

Read the latest Blogs

Forums

The "ORDER BY" clause behavior

By Alessandro Mortola

Comments posted to this topic are about the item The "ORDER BY" clause behavior

Are IT Certifications Still Relevant?

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Are IT Certifications Still Relevant?

SQL-CTE reqursive query

By jjjohn

I have table TicketNumbers i     TicketNumber  UID 2    10                        09901a22c7c3acc6786847c775f1d113 6    5                          00dad28bef21f916240d6e8c1c1bd67d 12 ...

Visit the forum

Question of the Day

The "ORDER BY" clause behavior

Let’s consider the following script that can be executed without any error on both SQL Sever and PostgreSQL. We define the table t1 in which we insert three records:

create table t1 (id int primary key, city varchar(50));

insert into t1 values (1, 'Rome'), (2, 'New York'), (3, NULL);
If we execute the following query, how will the records be sorted in both environments?
select city

from t1

order by city;

See possible answers