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
Anonymous
Not applicable

A measure based on conditions that I can't do due to lack of experience

Hey there, 
I've been struggling with this problem for a week now, I am relatively new to DAX and have never worked with time series in it.

Pre-requisites (tables):

1) with the Project name and the date when the dashboard was created for it

PreacherBaby_0-1665736794186.png

2) The Project name (it has parts, like physical parts, and details), part # (part's name), and the date when the part was added

PreacherBaby_2-1665736933713.png

What do I want from the measure (there are many projects, but as an example, let's pick project 976)

- As you can see in the tables above, project 976 has a dashboard created in the month of August (8/18/2022)

- And it also has parts that were added both in the same month and a long time ago (before August, for the sake of simplicity)

 

Conditions

1) If the project has AT LEAST ONE part added in the month OR before its dashboard has been created - the project meets the criteria to be displayed. 

  • Example: project 976's dashboard was activated in the month of August, and it has AT LEAST one part that was added in/before August. That is why 976 meets the criteria to be displayed in the stacked bar chart for August and its upcoming months: September, October, and so on.

2)  If the project doesn't have AT LEAST ONE part added in the month OR before its dashboard has been created - the project does not meet the criteria to be displayed. 

  • Example: Imagine project 976's dashboard was activated in the month of August, but there isn't a single part that was added in/before August. 976 does not meet the criteria to be displayed in the stacked bar chart for August and its upcoming months: September, October, and so on.

3) If the project does have AT LEAST ONE part added, BUT it happened AFTER the dashboard has been created - the project should be displayed in the month when both criteria have been met.

  • Example: Imagine project 976's dashboard was activated in the month of August, but it had AT LEAST one part added in September - project 976 should not be displayed in August, but it should be displayed for September and upcoming months.

4) Same rules apply when the project has AT LEAST ONE part in, for example, August, but the dashboard was activated in September: it means that the project should not be displayed in August, but to be displayed starting from September. 


This measure will work as a filter for the stacked bar chart which is the count of the projects

PreacherBaby_3-1665737524003.png

 

1 REPLY 1
lbendlin
Super User
Super User

Please provide sanitized sample data that fully covers your issue.
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

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.

Top Solution Authors