0% found this document useful (0 votes)
22 views2 pages

Day 18

This document discusses various mathematical and text functions available in Power BI. It provides examples of 5 common mathematical functions: floor, pi, mod, power, and fact. It also lists 5 common text functions: lower, upper, format, left, and right and provides the syntax and examples of how to use each one. The document directs the reader to Microsoft Learn and Power BI documentation for a full list of these types of functions.

Uploaded by

Satish Dhawale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views2 pages

Day 18

This document discusses various mathematical and text functions available in Power BI. It provides examples of 5 common mathematical functions: floor, pi, mod, power, and fact. It also lists 5 common text functions: lower, upper, format, left, and right and provides the syntax and examples of how to use each one. The document directs the reader to Microsoft Learn and Power BI documentation for a full list of these types of functions.

Uploaded by

Satish Dhawale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Day 18

DAX functions – 3

D. Mathematical functions:

1. Floor

Rounds a number down, toward zero, to the nearest multiple of significance.

Syntax: floor(number, significance)

Example: New Sales = floor(Sales[ProductCost], 0.1) //Sales is table name and ProductCost is column
name

2. Pi

Returns the value of π, 3.14159265358979, accurate to 15 digits.

Syntax: pi()

Example: Value of Pi = pi()

3. Mod

Returns the remainder after a number is divided by a divisor.

Syntax: mod(number, divisor)

Example: Mod value = mod(10,3) //output would be 1

4. Power

Returns the result of a number raised to a power.

Syntax: power(number, power_multiple)

Example: Square of Product cost = power(Sales[ProductCost], 2)

5. Fact
Returns the factorial of a number, equal to 1*2*3*...* Number.
Syntax: fact(number)
Example: Factorial value of Cost = fact(Sales[ProductCost])

For the complete list of Math functions available in Power BI, refer the following article:
Math and Trig functions - DAX Guide
E. Text functions:

Power BI provides a wide range of text functions as well.

Some common ones are listed below, along with their syntax and examples.

1. Lower
Converts all the letters in a text string to lowercase
Syntax: lower(text)
Example: Product Name = lower(“TOYS”) //output will be toys

2. Upper
Converts all the letters in a text string to uppercase
Syntax: upper(text)
Example: Product Name = upper(“toys”) //output will be TOYS

3. Format
Converts a value to text based on some specific format
Syntax:
Format(value, format string)
Example: New Currency Value = format(300.59, “Currency”)
Output: $300.59 //US dollar is the default currency mode in Power BI

4. Left
Returns the specified number of characters from the start of a text string.
Syntax: left(text, no_of_characters)
Example: Region Name = Left(“European”, 3)
Output: Eur

5. Right
Returns the last character or characters in a text string, based on the number of characters
you specify.

Syntax: right(text, no_of_characters)


Example: End of text = right(“Three plus four is seven”, 5)
Output: seven

For the entire list of text functions in Power BI, refer the below link:
Text functions (DAX) - DAX | Microsoft Learn
Text functions - DAX Guide

Latest DAX functions released in Power BI:


WINDOW - DAX Guide
PARTITIONBY - DAX Guide
ORDERBY - DAX Guide

***

You might also like