- Getting Started
- Administration Guide
-
User Guide
- An Introduction to Wyn Enterprise
- Document Portal for End Users
- Data Governance and Modeling
- Working with Resources
- Working with Reports
- Working with Dashboards
- View and Manage Documents
-
Understanding Wyn Analytical Expressions
- Syntax
- Measures and Calculated Columns
- Operators
- Functions
- Statements
-
Use Cases
- Use Case 1 - Actual Sales Profit
- Use Case 2 - Transaction Analysis per Customer
- Use Case 3 - Categorize fields based on calculations
- Use Case 4 - Cumulative Analysis
- Use Case 5 - RFM Model and Customer Value Analysis
- Use Case 6 - Correlation analysis
- Use Case 7 - Pareto analysis
- Use Case 8 - Difference analysis for any time period
- Use Case 9 - Sum by Product
- Best Practices
- Limitations
- Glossary
- Case...when Syntax
- Section 508 Compliance
- Subscribe to RSS Feed for Wyn Builds Site
- Developer Guide
Use Case 1 - Actual Sales Profit
Case 1: Actual Sale Profit
Requirement
In this case, we will calculate the actual sales profit using the category name as a dimension. The formula for calculating the actual sales profit is:
(SaleAmount*(1-Discount)-UnitPrice)*Quantity
Steps for creating a dashboard
1.Drag a Column chart and drag the English Product category name to Axis.
2. Add a calculated column on Table 'FactResellerSales'.
3. Input the expression given below and save it as SaleProfit. So the name of the Calculated Column will be SaleProfit.
('FactResellerSales'[SalesAmount]*(1-'DimPromotion'[DiscountPct])-'FactResellerSales'[UnitPrice])*'FactResellerSales'[OrderQuantity]
4. Drag the calculated column SaleProfit to the Values. Aggregation Method chooses sum.
Explanation
('FactResellerSales'[SalesAmount]*(1-'DimPromotion'[DiscountPct])-'FactResellerSales'[UnitPrice])*'FactResellerSales'[OrderQuantity]
The calculated column above is a special column. We can use it as a normal column. It can be dragged to the dimension, values, filters, sort, etc.
The whole WAX is below for this dashboard request.
EVALUATE
SUMMARIZE(
CALCULATETABLE(
SELECTATTRIBUTES(
'DimProductCategory'[EnglishProductCategoryName]
)
),
'DimProductCategory'[EnglishProductCategoryName],
"FactResellerSales_SaleProfit_SUMX",
CALCULATE(
SUMX(
CALCULATETABLE(
ADDCOLUMNS(
SELECTATTRIBUTES(
FactResellerSales,
'DimProductCategory'[EnglishProductCategoryName]
),
"FactResellerSales_SaleProfit",
(
(
(
'FactResellerSales'[SalesAmount]
-
(
1
-
'DimPromotion'[DiscountPct]
)
)
-
'FactResellerSales'[UnitPrice]
)
*
'FactResellerSales'[OrderQuantity]
)
)
),
[FactResellerSales_SaleProfit]
)
)
)