TRUE
A
C
- CALCULATE
- CALCULATETABLE
- CALENDAR
- CALENDARAUTO
- CEILING
- CHISQ.DIST
- CHISQ.DIST.RT
- CHISQ.INV
- CHISQ.INV.RT
- CLOSINGBALANCEMONTH
- CLOSINGBALANCEQUARTER
- CLOSINGBALANCEYEAR
- COALESCE
- COLUMNSTATISTICS
- COMBIN
- COMBINA
- COMBINEVALUES
- CONCATENATE
- CONCATENATEX
- CONFIDENCE.NORM
- CONFIDENCE.T
- CONTAINS
- CONTAINSROW
- CONTAINSSTRING
- CONTAINSSTRINGEXACT
- CONVERT
- COS
- COSH
- COT
- COTH
- COUNT
- COUNTA
- COUNTAX
- COUNTBLANK
- COUNTROWS
- COUNTX
- COUPDAYBS
- COUPDAYS
- COUPDAYSNC
- COUPNCD
- COUPNUM
- COUPPCD
- CROSSFILTER
- CROSSJOIN
- CUMIPMT
- CUMPRINC
- CURRENCY
- CURRENTGROUP
- CUSTOMDATA
D
E
I
N
O
P
R
S
- SAMEPERIODLASTYEAR
- SAMPLE
- SEARCH
- SECOND
- SELECTCOLUMNS
- SELECTEDMEASURE
- SELECTEDMEASUREFORMATSTRING
- SELECTEDMEASURENAME
- SELECTEDVALUE
- SIGN
- SIN
- SINH
- SLN
- SQRT
- SQRTPI
- STARTOFMONTH
- STARTOFQUARTER
- STARTOFYEAR
- STDEVX.P
- STDEVX.S
- STDEV.P
- STDEV.S
- SUBSTITUTE
- SUBSTITUTEWITHINDEX
- SUM
- SUMMARIZE
- SUMMARIZECOLUMNS
- SUMX
- SWITCH
- SYD
T
U
Syntax
The syntax for the TRUE function is straightforward:
TRUE()
As you can see, the function takes no arguments. It simply returns the Boolean TRUE value.
Usage
The TRUE function is most commonly used in conjunction with other logical functions in DAX. For example, the IF function can be used to evaluate a condition and return a value if it is true, or a different value if it is false. Let's take a look at an example:
=IF(Sales[SalesAmount] ❱ 10000, “High”, “Low”)
In this example, we are using the IF function to evaluate whether the SalesAmount in the Sales table is greater than 10000. If it is, the function returns the string "High". If it is not, the function returns the string "Low". However, what if we want to return a Boolean TRUE value instead of a string? This is where the TRUE function comes in:
=IF(Sales[SalesAmount] ❱ 10000, TRUE(), FALSE())
In this modified example, we are using the IF function to evaluate whether the SalesAmount in the Sales table is greater than 10000. If it is, the function returns the Boolean TRUE value. If it is not, the function returns the Boolean FALSE value.
The TRUE function is a simple but powerful function in DAX. It is used to return the Boolean TRUE value and is commonly used in conjunction with other logical functions to evaluate conditions and return a result. By using the TRUE function in your DAX formulas, you can create more powerful and flexible calculations in Power BI.