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

Send Bulk Email from Excel for Outlook

  Download the File from below Link https://drive.google.com/file/d/1tcb4lzNFgEfDKsvQqCW05sgoiGFEhqcK/view?usp=sharing Instructions are given in the image below. Save the File as Excel Macro - Enabled workbook (.xlsm) Use this file to send bulk emails at a time i personally have sent more than 2000 bulk emails at a time. Error may occur if email id typed contains space etc. Only one email id one cell.

Pivot table for Each item in Report Filter - Hidden Feature

The pivot table below shows products across the top and customers down the side. The pivot table is sorted so the largest customers are at the top. The Sales Rep field is in the report filter. If you open the Rep dropdown, you can filter the data to any one sales rep. This is a great way to create a report for each sales rep. Each report summarizes the revenue from a particular salesperson‘s customers, with the biggest customers at the top. And you get to see the split between the various products. The Excel team has hidden a feature called Show Report Filter Pages. Select any pivot table that has a field in the report filter. Go to the Analyze tab (or the Options tab in Excel 2007/2010). On the far left side is the large Options button. Next to the large Options button is a tiny dropdown arrow. Click this dropdown and choose Show Report Filter Pages.... Excel asks which field you want to use. Select the one you want (in this case the only one available) and click OK. Over the next few...

Import CSV In Power BI

  Import CSV file Click on Get Data à More à File option and select Text/CSV . Navigate to the CSV file which needs to be imported FL_insurance_sample.csv . Select the file and click on Open. FL_insurance_sampleDownload In the CSV window on top we have 3 dropdowns, preview of data and data load options.  Select Load and it will load to power query editor window. In the Power query editor the CSV file is loaded as a Queries . In power query editor we can edit, clean and transform the file as required. 3 Dropdowns and Data Load File Origin – Type of file origin. By default its 1252 Wester European (Windows). It’s the file type as per OS and region and country. Delimiter – Delimiter for column separation. By default it detects the delimiter from data , If the delimiter is not from the default options then we can select custom delimiter. Data Type Detection – By default it detects data types of columns based on top 200 rows, we can select entire data or do not detect data type ...