ISEVEN

ISEVEN

How to Use the Power BI DAX function ISEVEN

Syntax of the ISEVEN Function

The syntax of the ISEVEN function is as follows:


ISEVEN(❰number❱)


where `❰number❱` is the number that you want to check for evenness.

Examples of the ISEVEN Function

Let's take a look at some examples to understand how the ISEVEN function works.

Example 1

Suppose we have a table `Sales` with a column `Amount` that contains the following values:

| Amount |

|--------|

| 100 |

| 75 |

| 50 |

| 25 |

| 0 |

To check whether each value in the `Amount` column is even or odd, we can create a new calculated column using the following DAX formula:


IsEven = ISEVEN(Sales[Amount])


This will return the following values:

| Amount | IsEven |

|--------|--------|

| 100 | TRUE |

| 75 | FALSE |

| 50 | TRUE |

| 25 | FALSE |

| 0 | TRUE |

Example 2

Suppose we have a table `Employees` with a column `Age` that contains the following values:

| Age |

|-----|

| 25 |

| 32 |

| 47 |

| 54 |

| 61 |

To filter out the employees whose age is odd, we can create a new measure using the following DAX formula:


EvenAgeCount = CALCULATE(COUNT(Employees[Age]), ISEVEN(Employees[Age]))


This will return the count of employees whose age is even.

The ISEVEN function in Power BI's DAX formula language is a handy tool to determine whether a given number is even or odd. It can be used in various scenarios, such as filtering out odd values or calculating even values. By understanding the syntax and examples of the ISEVEN function, you can leverage its power in your Power BI reports and dashboards.

Power BI DAX Training Courses by G Com Solutions (0800 998 9248)

Upcoming Courses

Contact Us

Subject

Your Name (required)

Company/Organisation

Email (required)

Telephone

Training Course(s)

Your Message

Upload Example Document(s) (Zip multiple files)

Copyright, G Com Solutions Ltd, 2024.
Tower Bridge Business Centre, 46-48 East Smithfield, London E1W 1AW
0800 998 9248   |   9:00 a.m. till 5:30 p.m.

Connect With Me: