- 72
- 1 157
Lakshmanan M
India
Приєднався 10 лип 2018
DAX Tip: Dynamic Discount Calculation Based on Bands
**💡 DAX Tip: Dynamic Discount Calculation Based on Bands**
🚀 Ever wondered how to calculate the **total discount** dynamically for each discount band in your dataset? Here's a cool DAX query that summarizes the **Total Discount** for bands like *High*, *Low*, or others, based on specific multipliers!
### Problem Statement:
We want to calculate the **Total Discount** in the `financials` table based on the following conditions:
- **High Band**: Multiply the discount by `1.232`
- **Low Band**: Multiply the discount by `0.23233`
- **Other Bands**: Multiply the discount by `0.5444`
### DAX Query:
```DAX
EVALUATE
SUMMARIZE(
financials,
financials[Discount Band],
"Total Discount",
SUMX(
financials,
IF(
financials[Discount Band] = "High",
financials[Discounts] * 1.232,
IF(
financials[Discount Band] = "Low",
financials[Discounts] * 0.23233,
financials[Discounts] * 0.5444
)
)
)
)
```
### Explanation:
1. **`SUMMARIZE`**: Groups data by the `Discount Band` column.
2. **`SUMX`**: Iterates over the rows in `financials` and applies the multiplier logic for each band.
3. **Logic**:
- If the band is `"High"`, apply `1.232`.
- If the band is `"Low"`, apply `0.23233`.
- Otherwise, use the multiplier `0.5444`.
This query returns the **Total Discount** for each band in an easy-to-understand format. 📊
---
✨ This is a perfect use case of **conditional calculations** in Power BI using DAX. Try it in your reports and let your data tell the story!
💼 #PowerBI #DAX #DataAnalytics #FinancialAnalysis #LinkedInLearning
🚀 Ever wondered how to calculate the **total discount** dynamically for each discount band in your dataset? Here's a cool DAX query that summarizes the **Total Discount** for bands like *High*, *Low*, or others, based on specific multipliers!
### Problem Statement:
We want to calculate the **Total Discount** in the `financials` table based on the following conditions:
- **High Band**: Multiply the discount by `1.232`
- **Low Band**: Multiply the discount by `0.23233`
- **Other Bands**: Multiply the discount by `0.5444`
### DAX Query:
```DAX
EVALUATE
SUMMARIZE(
financials,
financials[Discount Band],
"Total Discount",
SUMX(
financials,
IF(
financials[Discount Band] = "High",
financials[Discounts] * 1.232,
IF(
financials[Discount Band] = "Low",
financials[Discounts] * 0.23233,
financials[Discounts] * 0.5444
)
)
)
)
```
### Explanation:
1. **`SUMMARIZE`**: Groups data by the `Discount Band` column.
2. **`SUMX`**: Iterates over the rows in `financials` and applies the multiplier logic for each band.
3. **Logic**:
- If the band is `"High"`, apply `1.232`.
- If the band is `"Low"`, apply `0.23233`.
- Otherwise, use the multiplier `0.5444`.
This query returns the **Total Discount** for each band in an easy-to-understand format. 📊
---
✨ This is a perfect use case of **conditional calculations** in Power BI using DAX. Try it in your reports and let your data tell the story!
💼 #PowerBI #DAX #DataAnalytics #FinancialAnalysis #LinkedInLearning
Переглядів: 0
Відео
Power BI DAX Sum,Sumx,Average,Averagex
2 години тому
🔢 Exploring DAX Aggregation Functions in Power BI 🔍 As a Data Enthusiast, I love diving deep into DAX! Today, I experimented with aggregation functions like `SUM`, `SUMX`, `AVERAGE`, and `AVERAGEX` and how they work with calculated columns in a dataset. Here's a quick example: DAX Query: ```DAX EVALUATE ADDCOLUMNS( financials, "Sum", SUM(financials[Sale Price]), "Sumx", SUMX(financials, financi...
Power BI - Dax
Переглядів 112 годин тому
💡 DAX Question of the Day: ❓ What are the total sales and total quantity for the product 'Xerox 1967' in the 'Office Supplies' category? Here's the DAX query to answer this: EVALUATE FILTER( SUMMARIZECOLUMNS( products[category], products[product_name], "Total Sales", SUM(orders[sales]), "Total Quantity", SUM(orders[quantity]) ), (products[product_name] = "Xerox 1967") && (products[category] = "...
Power BI DAX Add Column Year, Month, Day
Переглядів 114 годин тому
🚀 Power BI DAX of the Day 🚀 Here’s a quick and powerful DAX snippet to extract Year, Month, and Day from a date column: EVALUATE ADDCOLUMNS( SELECTCOLUMNS(financials, "Date", financials[Date]), "Year", YEAR([Date]), "Month", MONTH([Date]), "Day", MONTH([Date]) ) 🔍 What does it do? 1️⃣ SELECTCOLUMNS: Pulls only the Date column from the financials table. 2️⃣ ADDCOLUMNS: Adds calculated columns fo...
Power BI DAX SUMMARIZECOLUMNS
Переглядів 216 годин тому
💡 Power BI Tip of the Day: Advanced Summarization with SUMMARIZECOLUMNS: Want to create targeted summaries in Power BI? Here's how you can use SUMMARIZECOLUMNS to filter data dynamically and calculate key metrics! 👨💻 DAX Code Example: EVALUATE SUMMARIZECOLUMNS( financials[Product], financials[Country], FILTER(financials, financials[Country] IN {"Canada", "France"}), "Sales Price", SUM(financia...
RPA Uipath Input Dialog Write line
Переглядів 521 годину тому
🚀 Simplifying User Interaction in UiPath with Input Dialog and Write Line As I dive deeper into UiPath RPA, I recently worked on a simple yet effective workflow using: 1️⃣ Input Dialog - To gather user input dynamically during automation. 2️⃣ Write Line - To display or log the captured input for validation or debugging. 🔧 How It Works: The Input Dialog prompts the user to select or enter a valu...
2 RAP Uipath Input Dialog Multiple Choice
Переглядів 8День тому
🚀 Enhancing Automation with UiPath Input Dialog - Multiple Choice Made Easy! As part of my journey in process automation, I recently explored a fantastic feature in UiPath: Input Dialog with multiple-choice options. 🛠️ This functionality allows users to select predefined options during automation execution, making processes more interactive and user-friendly! Here's how it can be applied: 👉 Sce...
Python in Excel Rename columns and Describe
Переглядів 5День тому
🚀 Transforming Data into Insights! 📊 I recently worked on renaming and refining key columns in a dataset for enhanced clarity and conducted descriptive statistical analysis on the data. By renaming columns such as: Annual Income (k$) ➡️ Annual Income Spending Score (1-100) ➡️ Spending Score I ensured better readability and usability for downstream analysis. Running describe() helped summarize k...
Python in Excel - Drop Columns
Переглядів 9День тому
🎉 Excel Python = Productivity Boost! 💻📊 Ever wondered how to seamlessly integrate Python into Excel for powerful data manipulation? 🚀 Recently, I worked on a project where I had to drop multiple columns in Excel using Python, and the =PY() function in Excel 365 made it incredibly easy. Here's how it works: 1️⃣ Open your workbook in Excel 365 (Insider Beta channel). 2️⃣ Use the =PY() function to...
RAP Uipath Helloworld
Переглядів 3День тому
🚀 Exploring the World of RPA with UiPath! 🤖 Today, I took my first step into Robotic Process Automation (RPA) using UiPath by building a simple "Hello, World!" automation. 🌟 With just a few clicks and some drag-and-drop magic, I created a message box that displayed "Hello, World!". While it might seem like a small start, it's an exciting milestone in my journey to learn how RPA can streamline r...
Create Dynamic Line Charts in Excel with Python & Pandas!
Переглядів 19Місяць тому
📈 Create Dynamic Line Charts in Excel with Python & Pandas! 🐍📊 Visualizing trends in your data has never been easier! With Pandas and Matplotlib, you can generate insightful line plots directly from your data. Here’s a simple use case: ✅ Group by Date: Aggregate sales data on a monthly basis using pd.Grouper to understand trends over time. ✅ Create the Line Plot: Set the x-axis to the Date colu...
Drop Duplicate in Excel using Pandas
Переглядів 11Місяць тому
🚀 Simplify Your Excel Workflows with Pandas: Dropping Duplicates Made Easy! 🐼📉 Managing duplicate data in Excel can be tedious, but with Python's Pandas library, it’s a breeze! Here's how Pandas can streamline your process: ✅ Identify and Drop Duplicates : Pandas lets you quickly remove duplicate rows, keeping only the unique ones. Whether you're cleaning a customer list or filtering transactio...
Power of Python (Pandas) for Excel Analysis 1
Переглядів 14Місяць тому
🚀 Unlock the Power of Python (Pandas) for Excel Analysis! 🐍📊 Excel is a powerhouse for data analysis, but when paired with Python's Pandas library, the possibilities become limitless! Here are three essential steps to elevate your data analysis game: 1️⃣ Create a DataFrame : Start by importing your Excel data into Pandas to take full advantage of its powerful data manipulation capabilities. 2️⃣...
Python as ETL Pipeline: Extract, Transform, and Load (ETL)
Переглядів 573 місяці тому
Python as ETL Pipeline: Extract, Transform, and Load (ETL)
ETL - Web Scraping Wikipedia Data - Extracted
Переглядів 143 місяці тому
ETL - Web Scraping Wikipedia Data - Extracted
AWS Upload, Read, Delete the S3 bucket data
Переглядів 43 місяці тому
AWS Upload, Read, Delete the S3 bucket data
Complete this Project Men, It will be help full for others.
Hi are you providing jobs on rpa uipath
Amazing feature! dropped a like for you.
one question. your banned from js?
😄