Skip to main content

20 Power BI Dax Measures


UserPower bi 20 dax measures 20 DAX (Data Analysis Expressions) measures in Power BI with examples:
  1. Total Sales:

    scss
    Total Sales = SUM(Sales[Amount])
  2. Average Sales Price:

    scss
    Avg Sales Price = AVERAGE(Sales[Amount])
  3. Total Units Sold:

    mathematica
    Total Units Sold = SUM(Sales[Quantity])
  4. Total Customers:

    scss
    Total Customers = COUNTROWS(Customer)
  5. Total Products:

    mathematica
    Total Products = COUNTROWS(Product)
  6. Maximum Sales Amount:

    scss
    Max Sales Amount = MAX(Sales[Amount])
  7. Minimum Sales Amount:

    scss
    Min Sales Amount = MIN(Sales[Amount])
  8. Sales Growth Percentage:

    mathematica
    Sales Growth % = (Total Sales - [Total Sales Last Year]) / [Total Sales Last Year]
  9. Total Profit:

    scss
    Total Profit = SUM(Sales[Profit])
  10. Total Orders:

    scss
    Total Orders = COUNTROWS(Orders)
  11. Total Customers with Sales:

    css
    Total Customers with Sales = COUNTROWS(FILTER(Customer, [Total Sales] > 0))
  12. Total Sales by Region:

    mathematica
    Total Sales by Region = SUMX(VALUES(Region[RegionName]), [Total Sales])
  13. Total Sales by Year:

    scss
    Total Sales by Year = SUMX(VALUES(Calendar[Year]), [Total Sales])
  14. Running Total Sales:

    scss
    Running Total Sales = SUMX(FILTER(ALL(Calendar), Calendar[Date] <= MAX(Calendar[Date])), [Total Sales])
  15. Top N Products by Sales:

    mathematica
    Top N Products by Sales = TOPN(5, ALL(Product), [Total Sales])
  16. Rolling Average Sales (3 Months):

    scss
    Rolling Avg Sales 3M = AVERAGEX(DATESYTD(Calendar[Date]), [Total Sales])
  17. Total Sales to Date:

    mathematica
    Total Sales to Date = TOTALYTD([Total Sales], Calendar[Date])
  18. Sales Rank by Product:

    mathematica
    Sales Rank by Product = RANKX(ALL(Product), [Total Sales], , DESC, Dense)
  19. Customer Churn Rate:

    css
    Customer Churn Rate = DIVIDE([Lost Customers], [Total Customers])
  20. Year-to-Date Growth:

    mathematica
    YTD Growth = DIVIDE([Total Sales], [Total Sales Last Year]) - 1

These measures cover a range of common calculations in Power BI, including basic aggregations, comparisons, and time-based calculations. You can adapt and customize them to suit your specific data and reporting needs

Comments

Popular posts from this blog

Data Model an easy substitute for Vlookup

  you have a data set with product, date, customer, and sales information. The IT department forgot to put sector in there. Here is a lookup table that maps customer to sector. Time for a VLOOKUP, right? There is no need to do VLOOKUPs to join these data sets if you have Excel 2013 or newer. These versions of Excel have incorporated the Power Pivot engine into the core Excel. (You could also do this by using the Power Pivot add-in for Excel 2010, but there are a few extra steps.) In both the original data set and the lookup table, use Home, Format as Table. On the Table Tools tab, rename the table from Table1 to something meaningful. I’ve used Data and Sectors. Select one cell in the data table. Choose Insert, Pivot Table. Starting in Excel 2013, there is an extra box, Add This Data to the Data Model, that you should select before clicking OK. The Pivot Table Fields list appears, with the fields from the Data table. Choose Revenue. Because you are using the Data Model, a new line a...

Power Point - Slide Master a very important tool

  When you want all your slides to contain the same fonts and images (such as logos), you can make those changes in one place—the Slide Master, and they'll be applied to all your slides. To open Slide Master view, on the   View   tab, select   Slide Master : The master slide is the top slide in the thumbnail pane on the left side of the window. The related layout masters appear just below the slide master (as in this picture from PowerPoint for macOS): 1  Slide master 2  Layout masters When you edit the slide master, all slides that are based on that master will contain those changes. However, the majority of changes that you make will most likely be to the layout masters related to the master. When you make changes to layout masters and the slide master in Slide Master view, other people working in your presentation (in Normal view) can’t accidentally delete or edit what you’ve done. Conversely, if you're working in Normal view and find that you'...

Improve your Excel Productivity with these Shortcuts and formulas

I have given below 45 tips and tricks to improve your productivity while working in Excel. Useful Keyboard Shortcuts 1.  To format any selected object , press ctrl+1 2.  To insert current date , press ctrl+; 3.  To insert current time , press ctrl+shift+; 4.  To repeat last action , press F4 5.  To edit a cell comment , press shift + F2 6.  To autosum selected cells , press alt + = 7.  To see the suggest drop-down in a cell , press alt + down arrow 8.  To enter multiple lines in a cell , press alt+enter 9.  To insert a new sheet , press shift + F11 10.  To edit active cell , press F2 (places cursor in the end) 11.  To hide current row , press ctrl+9 12.  To hide current column , press ctrl+0 13.  To unhide rows in selected range , press ctrl+shift+9 14.  To unhide columns in selected range , press ctrl+shift+0 15.  To recalculate formulas , press F9 16.  To select data in current region , press ctrl+shift+8 ...