6 DAX tips for Excel and Power BI users by theexcelclub

View this thread on steempeak.com
· @theexcelclub · (edited)
$7.09
6 DAX tips for Excel and Power BI users
DAX is quickly growing in popularity.  Advanced Excel skills have moved beyond single table analysis with static data, to complex data modeling and analysis across multiple tables of data with live connection sources.

<a href="https://theexcelclub.com/what-is-dax-data-analysis-expressions/">DAX, the language</a> used in both Power Pivot and Power BI is, based on the existing Excel formulas.&nbsp; It also includes some new functions with added power and abilities. &nbsp;This can make DAX confusing when you start to use it. &nbsp;Even for those with experience, there is always more to learn and more creative ways to do things. So without further delay, here are my 6 DAX tips for Excel and Power BI users.
<h3>6 DAX Tips</h3>
<h4>1. Use measures to carry out calculations.&nbsp;</h4>
Avoid adding unnecessary calculated columns to a table as they just add to your model.&nbsp; It would be common for Excel user to be in the habit of adding new columns to existing tables. &nbsp;This is because old Excel had the ability to pivot only one table of data and so it was often necessary to add additional columns to the initial data.&nbsp; Adding new columns is a bad habit to carry over into Power Pivot or Power BI.&nbsp; Use measures instead. You can <a href="https://theexcelclub.com/dax-count-and-countx-impact-of-using-measures-and-columns/">check out this article</a> to get a better understanding of the impact of Measures over calculated columns.
<h4>2. Hide Unnecessary Columns</h4>
Hide all unnecessary columns from your client tools. By doing so, users can not aggregate columns in the wrong way.&nbsp; You will need to keep any columns by which you want to slice or filter your data. Most often these will be label type columns.&nbsp; Once you have created measures carrying out all the calculations you need, there is no need to keep the column in sight.

To hide columns in Power Pivot, select the columns you wish to hide.&nbsp; Right click and select Hide from Client Tools.&nbsp;

<img src="https://theexcelclub.com/wp-content/uploads/2020/01/dax-tips-1-300x268.png" alt="DAX tips for excel users" width="300" height="268"><br/>

Once the columns have been hidden from client view, they will appear as grayed out within Power Pivot and when you create a pivot table, the columns will not be available.

To hide columns using Power BI, the option to select is Hide in report view.&nbsp; This can be done from data view, selecting the column and right clicking.&nbsp; Or you can also do it from diagram view, select the column you wish to hide.&nbsp; Right click and select Hide in report view

<img src="https://theexcelclub.com/wp-content/uploads/2020/01/dax-tips5.png" alt="" width="555" height="216"><br/>
<h4>3. Format Measures</h4>
Always format your measure when you create it. For example, if you are working with financials and you know you will need your data to show in Dollars or Euros then set the formatting of the measure to the currency type. This way you only need to set the formatting once as it will carry into any pivot table or charts each time you select that measure.&nbsp;

To format the measure in Excel, select the measure in the calculation field of Power Pivot.&nbsp; Formatting options can then be selected from the Home ribbon. Once you select your formatting type, it will be applied to the measure in the calculation fields and any time you use it.

<img src="https://theexcelclub.com/wp-content/uploads/2020/01/dax-tips-excel-2.png" alt="dax tips" width="672" height="833"><br/>
<h4>4. Write DAX like code</h4>
Use SHIFT Enter to move to a new line. This is another bad habit carried over from Excel.&nbsp; A habit I must admit I am finding hard to break myself.&nbsp; However, DAX is so much easier to read when it is written like code. Look at the following examples.&nbsp; Which one do you think is easier to read?

Total DR:=IF (NOT (ISFILTERED('tbl_date 1'[Date]) || ISFILTERED ( 'tbl_date 1'[Weekday] ) || ISFILTERED ( 'tbl_date 1'[Monthdaynumber] )),SUM ( Tbl_GL[DR]))

Or

<img src="https://theexcelclub.com/wp-content/uploads/2020/01/dax-tips.png" alt="dax tips" width="688" height="280"><br/>

Not only are DAX formulas easier to read when you write them like code.&nbsp; But they are also easier to debug if you run into problems or errors.
<h4>5. Avoid data transformations steps using DAX.</h4>
Data transformation steps should not be carried out in Power Pivot where possible. For example, the use text functions such as TRIM, CONCAT, FIND and so forth used to transform text data to a more usable format. A common use would be to split the first and second names from one to two cells. Or even to join the first and second name from two cells to one.&nbsp; Data transformation and cleansing should be carried out with a different tool. A tool such as Power Query.
<h4>6. Keep the structure of the model simple.</h4>
Star schema as shown below works best.&nbsp; This is where there is one Facts table and each dimension table is connected directly to the fact’s tables.

<img src="https://theexcelclub.com/wp-content/uploads/2020/01/dax-tips-3-300x177.png" alt="" width="300" height="177"><br/>

A Snowflake schema will have dimensions tables connected to other dimensions tables.&nbsp; Just like the example image below.&nbsp; Snowflake structures can be transformed into a star structure easily using Power Query.


<center><em>Do you want to start collecting rewards quickly for learning Excel?&nbsp; Then you should try:</em></center></p>
<center><a href="https://theexcelclub.com/excel-learn-earn/">10+ Excel Learn and Earn Activities YOU can do Today</a></center></p>



<h4><strong>SIGN UP FOR OUR NEWSLETTER TODAY – GET EXCEL TIPS TRICKS &amp; LEARN AND EARN ACTIVITIES TO YOUR INBOX</strong></h4>
<a role="button" href="https://theexcelclub.newzenler.com/f/email-signup">SIGN UP</a> <br /><center><hr/><em>Cross posted from my blog with <a href='https://wordpress.org/plugins/steempress/'>SteemPress</a> : https://theexcelclub.com/6-dax-tips-for-excel-and-power-bi-users/ </em><hr/></center>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 84 others
👎  
properties (23)
post_id83,596,542
authortheexcelclub
permlink6daxtipsforexcelandpowerbiusers-id578fhw5u
categoryhive-102332
json_metadata{"community":"steempress","app":"steemit\/0.1","tags":["excel","hive-174578","oc","posh"],"canonical_url":"https:\/\/theexcelclub.com\/6-dax-tips-for-excel-and-power-bi-users\/","image":["https:\/\/theexcelclub.com\/wp-content\/uploads\/2020\/01\/dax-tips-1-300x268.png","https:\/\/theexcelclub.com\/wp-content\/uploads\/2020\/01\/dax-tips5.png","https:\/\/theexcelclub.com\/wp-content\/uploads\/2020\/01\/dax-tips-excel-2.png","https:\/\/theexcelclub.com\/wp-content\/uploads\/2020\/01\/dax-tips.png","https:\/\/theexcelclub.com\/wp-content\/uploads\/2020\/01\/dax-tips-3-300x177.png"],"links":["https:\/\/theexcelclub.com\/what-is-dax-data-analysis-expressions\/","https:\/\/theexcelclub.com\/dax-count-and-countx-impact-of-using-measures-and-columns\/","https:\/\/theexcelclub.com\/excel-learn-earn\/","https:\/\/theexcelclub.newzenler.com\/f\/email-signup","https:\/\/wordpress.org\/plugins\/steempress\/","https:\/\/theexcelclub.com\/6-dax-tips-for-excel-and-power-bi-users\/"],"format":"markdown"}
created2020-01-20 11:30:03
last_update2020-01-20 11:39:24
depth0
children3
net_rshares28,464,541,658,412
last_payout2020-01-27 11:30:03
cashout_time1969-12-31 23:59:59
total_payout_value3.372 SBD
curator_payout_value3.716 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length6,071
author_reputation40,220,220,244,131
root_title"6 DAX tips for Excel and Power BI users"
beneficiaries
0.
accountsteempress
weight1,500
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (149)
@tts ·
To listen to the audio version of this article click on the play image.
[![](https://s18.postimg.org/51o0kpijd/play200x46.png)](http://ec2-52-72-169-104.compute-1.amazonaws.com/theexcelclub__6daxtipsforexcelandpowerbiusers-id578fhw5u.mp3)
Brought to you by [@tts](https://steemit.com/tts/@tts/introduction). If you find it useful please consider upvoting this reply.
👎  , ,
properties (23)
post_id83,596,714
authortts
permlinkre-6daxtipsforexcelandpowerbiusers-id578fhw5u-20200120t114117
categoryhive-102332
json_metadata{}
created2020-01-20 11:41:18
last_update2020-01-20 11:41:18
depth1
children0
net_rshares-48,285,049,121
last_payout2020-01-27 11:41:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length366
author_reputation-4,535,933,372,579
root_title"6 DAX tips for Excel and Power BI users"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (3)
@theexcelclub ·
#posh shared on twitter https://steemit.com/hive-102332/@theexcelclub/6daxtipsforexcelandpowerbiusers-id578fhw5u
properties (22)
post_id83,596,746
authortheexcelclub
permlinkq4elwf
categoryhive-102332
json_metadata{"tags":["posh"],"links":["https:\/\/steemit.com\/hive-102332\/@theexcelclub\/6daxtipsforexcelandpowerbiusers-id578fhw5u"],"app":"steemit\/0.1"}
created2020-01-20 11:43:30
last_update2020-01-20 11:43:30
depth1
children0
net_rshares0
last_payout2020-01-27 11:43:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 SBD
curator_payout_value0.000 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length112
author_reputation40,220,220,244,131
root_title"6 DAX tips for Excel and Power BI users"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
@dernan ·
$0.18
It's been some time since you did a DAX article Paula.  I have missed these.  All the tips provided are great and it is hard to pick a favorite.  If people could stick to these tips, it will save them a lot of time and heartache.
👍  
properties (23)
post_id83,599,777
authordernan
permlinkq4ert5
categoryhive-102332
json_metadata{"app":"steemit\/0.1"}
created2020-01-20 13:51:06
last_update2020-01-20 13:51:06
depth1
children0
net_rshares1,036,929,390,004
last_payout2020-01-27 13:51:06
cashout_time1969-12-31 23:59:59
total_payout_value0.090 SBD
curator_payout_value0.090 SBD
pending_payout_value0.000 SBD
promoted0.000 SBD
body_length229
author_reputation305,101,571,399
root_title"6 DAX tips for Excel and Power BI users"
beneficiaries[]
max_accepted_payout1,000,000.000 SBD
percent_steem_dollars10,000
author_curate_reward""
vote details (1)