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
P0W3RB1
Helper I
Helper I

Dates - Last 4 weeks, Next 4 weeks

Dates !!!! 🙂

 

In Dynamics CRM its very easy to pull off a report of for example all Orders older than X week, or Orders due in Next X weeks. Seems odd that Power BI doesnt have this simple function, dont you think?

 

There is a Microsoft provided content pack for Dynamics CRM sales, a pre-built dashboard and set of reports. I notice they have done exactly what i need to do, see screenshot. I need to create one called "Last4Weeks" and also need the ability to select truor or false, just like Microsoft have done here. How have they done this???

 

DATES.PNG

 

 

1 ACCEPTED SOLUTION

You can edit it after this step manually, just add seciond condition in code

Maxim Zelensky
excel-inside.pro

View solution in original post

4 REPLIES 4

Hello @P0W3RB1

You can add custom column with UI in Query Editor:

  1. Select dates column
  2. In "Add column" tab in "Date" group select Age
  3. Select new column, in "Transformation" tab in "Duration" group select "Days"
  4. Add custom conditions column with condition like "if [AgeFromDate]<28 and [AgeFromDate]>0 then true else false", name it Last4Weeks
  5. Add custom conditions column with condition like "if [AgeFromDate]>-28 and [AgeFromDate]>0 then true else false", name it Next4Weeks
  6. You can finetune where to add todays orders
Maxim Zelensky
excel-inside.pro

Hi @hohlick at step 4 do you mean this condition box? if so i dont see an option for "And"

 

 

  • Add custom conditions column with condition like "if [AgeFromDate]<28 and [AgeFromDate]>0 then true else false", name it Last4Weeks

 

 

age.PNG

You can edit it after this step manually, just add seciond condition in code

Maxim Zelensky
excel-inside.pro

Thank you @hohlick this appears to have worked, thank you!

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.