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

Indirect Function

INDIRECT  is pretty cool for grabbing a value from a cell. Can  INDIRECT  point to a multi-cell range and be used in a  VLOOKUP  or  SUMIF  function?  You can build an  INDIRECT  function that points to a range. The range might be used as the lookup table in a  VLOOKUP  or as a range in  SUMIF  or  COUNTIF . In  Figure , the formula pulls data from the worksheets specified in row 4. The second argument in the  SUMIF  function looks for records that match a certain date from column A. Note:  Because each worksheet might have a different number of records, I chose to have each range extend to 300. This is a number that is sufficiently larger than the number of transactions on any sheet. The formula in cell B5 is: =SUMIF(INDIRECT(B$4&"!A2:A300"), $A5, INDIRECT(B$4&"!C2:C300")) Summary:  You can use  INDIRECT  to grab data from a multi-cell range.

Formatting In Excel - helps you find meaning in the spreadsheet

  Formatting In Excel -  helps you find meaning in the spreadsheet  Spreadsheets are often seen as boring and pure tools of utility, but that doesn't mean that we can't bring some style and formatting to our spreadsheets Formatting helps your user find meaning in the spreadsheet without going through each and every individual cell. Cells with formatting will draw the viewer's attention to the important cells. In Excel, formatting worksheet data is easy. You can use several fast and simple ways to create professional-looking worksheets that display your data effectively. For example, you can use document themes for a uniform look throughout all of your Excel spreadsheets, styles to apply predefined formats, and other manual formatting features to highlight important data. Formatting a Data Raw Data   Using Font, Number tabs as shown in image to do a simple formatting   Formatting a Data with help of formatting tools in Excel  As shown in image , we have Prod...