当前位置:网站首页>PowerPivot - DAX (first time)
PowerPivot - DAX (first time)
2022-07-06 19:58:00 【Begin to change】
One 、 Introduce
1、 summary
Data analysis expressions (DAX) Is in Analysis Services、Power BI as well as Excel Medium Power Pivot Formula expression language used . DAX Formulas include functions 、 Operators and values , It is used to perform advanced calculations and queries on the data in related tables and columns in the table data model .
2、 The formula
DAX Formulas are important for creating calculations in calculated columns and measures and protecting data with row level security . To create formulas for calculating columns and measures , Please use the formula bar at the top of the model designer window or DAX Editor .
3、 Basic knowledge of formulas
Whether the formula created is simple or complex , You can generate formulas according to the following steps :
① Each formula must be marked with an equal sign (=) start .
② You can type or select a function name , You can also type an expression .
③ Start typing the first few letters of the desired function or name , The autocomplete function will show the available functions 、 List of tables and columns . Press Tab Key to add items from the autocomplete list to the formula .
You can also click Fx The button displays a list of available functions . To select a function from the drop-down list , Please use the arrow keys to highlight the item , And then click “ determine ” Add this function to the formula .
④ By selecting parameters from the drop-down list of possible tables and columns , Or by typing a value , Give the function parameters .
⑤ Check for grammatical errors : Make sure all parentheses are paired , And the column is referenced correctly 、 Table and value .
⑥ Press Enter Key accepts the formula .
example :
Days in Current Quarter = COUNTROWS( DATESBETWEEN( 'Date'[Date], STARTOFQUARTER( LASTDATE('Date'[Date])), ENDOFQUARTER('Date'[Date])))
This measure is used to create a comparison ratio between an incomplete period and the previous period . The formula must consider the proportion of the elapsed time period , And compare it with the same proportion in the previous period .
Two 、DAX Operator
1、 Definition
Data analysis expressions (DAX) Language uses operators to create comparison values 、 Expressions that perform arithmetic calculations or process strings .
2、 Operator type
There are four different types of operators : Arithmetic operator 、 Comparison operator 、 Text concatenation operator and logical operator .
3、 Arithmetic operator
To perform basic mathematical operations ( Such as addition 、 Subtraction or multiplication )、 Combine numbers and generate numerical results , Please use the following arithmetic operators .
4、 Comparison operator
You can use the following operators to compare two values . When comparing two values using these operators , The result is a logical value (TRUE or FALSE).
5、 Text concatenation operator
Use and (&) Join or concatenate two or more text strings to produce a single text segment .
6、 Logical operators
Use logical operators (&&) and (||) Combine expressions to produce a single result .
边栏推荐
- 121. The best time to buy and sell stocks
- Teach you to learn JS prototype and prototype chain hand in hand, a tutorial that monkeys can understand
- Configuration and simple usage of the EXE backdoor generation tool quasar
- 微信小程序常用集合
- Redisson bug analysis
- Information System Project Manager - Chapter VIII project quality management
- Groovy基础语法整理
- 从sparse.csc.csr_matrix生成邻接矩阵
- 腾讯字节阿里小米京东大厂Offer拿到手软,老师讲的真棒
- Vmware虚拟机无法打开内核设备“\\.\Global\vmx86“的解决方法
猜你喜欢
腾讯T3大牛手把手教你,大厂内部资料
Teach you to learn JS prototype and prototype chain hand in hand, a tutorial that monkeys can understand
学习打卡web
算法面试经典100题,Android程序员最新职业规划
Blue Bridge Cup microbial proliferation C language
某东短信登录复活 安装部署教程
腾讯安卓开发面试,android开发的基础知识
Node.js: express + MySQL实现注册登录,身份认证
In simple terms, interview surprise Edition
【计网】第三章 数据链路层(3)信道划分介质访问控制
随机推荐
小微企业难做账?智能代账小工具快用起来
精彩编码 【进制转换】
JVM_常见【面试题】
腾讯T3大牛手把手教你,大厂内部资料
信息系统项目管理师---第八章 项目质量管理
Social recruitment interview experience, 2022 latest Android high-frequency selected interview questions sharing
《数字经济全景白皮书》保险数字化篇 重磅发布
Cf960g - bandit Blues (type I Stirling number +ogf)
Cesium 两点之间的直线距离
Configuration and simple usage of the EXE backdoor generation tool quasar
腾讯T2大牛亲自讲解,跳槽薪资翻倍
夏志刚介绍
微信小程序常用集合
Web开发小妙招:巧用ThreadLocal规避层层传值
深入浅出,面试突击版
350. 两个数组的交集 II
[play with Linux] [docker] MySQL installation and configuration
From spark csc. csr_ Matrix generate adjacency matrix
POJ1149 PIGS 【最大流量】
POJ3617 Best Cow Line 馋