PowerBI Tutorials
PowerBI Tutorials
Rolling Calendar
a. add Blank Query
b. input starting date
c. convert to table
d. input code
= List.Dates(
Source,
Number.From(DateTime.LocalNow()) -
Number.From(Source),
#duration(1,0,0,0)
)
DAX If statement
Quantity Type =
IF(
'Sales Data'[OrderQuantity]>1,
"Multiple Items",
"Single Item"
)
LEN(Text)
CONCATENATE (Text1, Text2)
UPPER(Text)
LOWER(Text)
LEFT(Text,[NumChars])
RIGHT(Text,[NumChars])
MID(Text,[StartPosition],[NumChars])
Substitute(Text, OldText, NewText, [instance_num])
search(FindText,WithinText,[StartPosition],[NotFoundValue])
TODAY()
NOW()
DAY(date)
MONTH(date)
YEAR(date)
HOUR(datetime)
MINUTE(datetime)
SECOND(datetime)
WEEKDAY(date, [ReturnType])
WEEKNUM(date,[ReturnType])
EOMONTH(Startdate, Months)
DATEDIFF
RELATED(ColumnName)
CALCULATE(Expression,[Filter1],[Filter2],...)
ALL(table)
FILTER(Table, FilterExpression)
RELATED(columname)
Iteratorx
SUMX(Table, Expression)
COUNTX
AVERAGEX
RANKX
MAXX
MINX
CALCULATE(Measure, DATESYTD(Calendar[Date]))
CALCULATE(Measure, DATEADD(Calendar[Date],-1,MONTH))
CALCULATE(Measure,DATESINPERIOD(Calendar[Date],MAX(Calendar[Date]),-10,DAY))
UNICHAR (######)
COUNT(ColumnName)
COUNTA(ColumnName)
COUNTAX(Table, Expression)
COUNTBLANK(ColumnName)
COUNTROWS(Table)
COUNTX(Table, Expression)
addition
subtraction
multiplication
division
exponent
equal to
greater than
less than
greater than or equal to
less than or equal to
not equal to
"concatenante" two values to produce one string
AND condition
OR condtion. Double pipe ||
logical OR based on a given list. IN {item1, item2,...}
call a symbol. used mostly when using concatenate. Search internet UNICHAR codes. Example:
uparrow, downarrow, leftarrow, rightarrow