Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I am into learning phase of DAX and I need to create two type of DAX:
Requirement 1:
I need to make DAX for - Projected sales for Month . The DAX should display projected values for the month, user has selected from dropdown. Logic to calculate projected quantity and projected value is:
= Condition1 +( Condition2 + consider Order dates in current month + Condition3)
Projected Sales for Month | |
Qty | Value |
Now, how to write DAX for this logic that considers Order dates only for the selected month?
Requirement 2:
Here also, the user would be selecting a month from dropdown and the logic is:
= Condition1 + ETD (Estimated Time of Departure) Date upto 7th of next month + Condition2 + condition3
Qty | Value |
How to write DAX for this logic that considers ETD (dates) upto 7th of next month?
Please let me know, any additional clarification is required from my end.
Any help would be a big help! 🙂
Thank you.
@archuleta28 ,The information you have provided is not making the problem clear to me. Can you please explain with an example.
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Appreciate your Kudos.
Thanks @amitchandak for your quick response!
I think I do not have option to upload my pbix here so please consider below sample data for your reference:
OrderDate | SONo | QTY | Date1 | ETD | Custom Number | Value |
29-08-2022 | 645 | 108 | NULL | 02-09-2022 | 9O1308 | 4589 |
10-10-2022 | 1006 | 135 | NULL | 10-12-2022 | 9O1945 | 4700 |
11-09-2022 | 507 | 135 | NULL | 06-10-2022 | 9O0552 | 3088 |
10-05-2022 | 70 | 135 | NULL | 31-06-2022 | R9176 | 4030 |
10-08-2022 | 2523 | 14 | 28-04-2022 | 14-09-2022 | 9O0588 | 2794 |
NULL | 79 | 13 | 28-04-2022 | 07-04-2022 | 9O0588 | 4223 |
NULL | 70 | 135 | 18-04-2022 | 31-05-2022 | S35476 | 4881 |
10-10-2022 | 270 | 135 | NULL | 05-11-2022 | 9O0488 | 4257 |
10-11-2022 | 507 | 135 | NULL | 16-12-2022 | 9O0552 | 4264 |
18-04-2022 | 1231 | 81 | 30-05-2022 | 01-06-2022 | 9O0571 | 4288 |
11-06-2022 | 500 | 0.1 | 15-06-2022 | 02-07-2022 | 9O0803 | 3198 |
08-07-2022 | 552 | 49.1 | 08-06-2022 | 30-08-2022 | 9O0685 | 2138 |
Two DAX calculations:
Calculation 1:
I need to calculate Quantity and Value with this condition:
-> Date1 is not blank+ Order date is in current month + Custom number is blank
Output should be in table format:
Qty | Value |
200 | 2000 |
Qty | Value |
Date1 is not blank+ Order date is in current month + Custom number is blank | Date1 is not blank+ Order date is in current month + Custom number is blank |
Calculation 2.:
I need to calculate Quantity and Value with this condition:
-> Date1 is not blank+ Consider ETD up to 7th of next month + Custom Number is blank
Output should be in table format:
Qty | Value |
100 | 1000 |
Qty | Value |
Date1 is not blank+ Consider ETD up to 7th of next month + Custom Number is blank | Date1 is not blank+ Consider ETD up to 7th of next month + Custom Number is blank |
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
105 | |
97 | |
80 | |
67 | |
63 |
User | Count |
---|---|
147 | |
110 | |
108 | |
85 | |
64 |