Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
archuleta28
Resolver I
Resolver I

Need help with date related DAX

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.

2 REPLIES 2
amitchandak
Super User
Super User

@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: 

OrderDateSONoQTYDate1ETDCustom NumberValue
29-08-2022645108NULL02-09-20229O13084589
10-10-20221006135NULL10-12-20229O19454700
11-09-2022507135NULL06-10-20229O05523088
10-05-202270135NULL31-06-2022R91764030
10-08-202225231428-04-202214-09-20229O05882794
NULL791328-04-202207-04-20229O05884223
NULL7013518-04-202231-05-2022S354764881
10-10-2022270135NULL05-11-20229O04884257
10-11-2022507135NULL16-12-20229O05524264
18-04-202212318130-05-202201-06-20229O05714288
11-06-20225000.115-06-202202-07-20229O08033198
08-07-202255249.108-06-202230-08-20229O06852138

 

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
2002000
Qty Value
Date1 is not blank+ Order date is in current month + Custom number is blankDate1 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
1001000
Qty Value
Date1 is not blank+ Consider ETD up to 7th of next month + Custom Number is blankDate1 is not blank+ Consider ETD up to 7th of next month + Custom Number is blank

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.