Power bi 20 dax measures 20 DAX (Data Analysis Expressions) measures in Power BI with examples:
Total Sales:
scssTotal Sales = SUM(Sales[Amount])
Average Sales Price:
scssAvg Sales Price = AVERAGE(Sales[Amount])
Total Units Sold:
mathematicaTotal Units Sold = SUM(Sales[Quantity])
Total Customers:
scssTotal Customers = COUNTROWS(Customer)
Total Products:
mathematicaTotal Products = COUNTROWS(Product)
Maximum Sales Amount:
scssMax Sales Amount = MAX(Sales[Amount])
Minimum Sales Amount:
scssMin Sales Amount = MIN(Sales[Amount])
Sales Growth Percentage:
mathematicaSales Growth % = (Total Sales - [Total Sales Last Year]) / [Total Sales Last Year]
Total Profit:
scssTotal Profit = SUM(Sales[Profit])
Total Orders:
scssTotal Orders = COUNTROWS(Orders)
Total Customers with Sales:
cssTotal Customers with Sales = COUNTROWS(FILTER(Customer, [Total Sales] > 0))
Total Sales by Region:
mathematicaTotal Sales by Region = SUMX(VALUES(Region[RegionName]), [Total Sales])
Total Sales by Year:
scssTotal Sales by Year = SUMX(VALUES(Calendar[Year]), [Total Sales])
Running Total Sales:
scssRunning Total Sales = SUMX(FILTER(ALL(Calendar), Calendar[Date] <= MAX(Calendar[Date])), [Total Sales])
Top N Products by Sales:
mathematicaTop N Products by Sales = TOPN(5, ALL(Product), [Total Sales])
Rolling Average Sales (3 Months):
scssRolling Avg Sales 3M = AVERAGEX(DATESYTD(Calendar[Date]), [Total Sales])
Total Sales to Date:
mathematicaTotal Sales to Date = TOTALYTD([Total Sales], Calendar[Date])
Sales Rank by Product:
mathematicaSales Rank by Product = RANKX(ALL(Product), [Total Sales], , DESC, Dense)
Customer Churn Rate:
cssCustomer Churn Rate = DIVIDE([Lost Customers], [Total Customers])
Year-to-Date Growth:
mathematicaYTD 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
Post a Comment