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
RustyNails
Helper III
Helper III

Calculate average of datediff measure based on Slicer selections from same column

I have a peculiar scenario. The data structure looks like this:

RustyNails_1-1675897484239.png

 


I want the user to be able to select TWO task_name values from a slicer (using ctrl button). Then, a measure should calculate the DateDiff of finish_date for those two task_names. For example, user selects Project ID ABC0104A-0002018301 from a slicer, then selects first task_name as Order Complete and second task_name as Ship Start, then the measure returns a measure that is Datediff of 10/1/2022 and 8/9/2022 which is 53. If the user selects multiple projects or no projects at all, it will average out the datediffs for those projects.

 

Finally, I also want to create a new "combined status column" that shows the user if both the tasks selected under task_name have the same date_status. If both the task_name have date_status of "Y", then it will say "Both Y". If both are of value "N", it will say "Both N". If they are mixed, then it will say "Mixed". Then the user selects this combined column from the slicer, and based on the selection, the datediff average measure should filter projects out. Quite a hefty ask! But any guidance is appreciated.

 

 

0 REPLIES 0

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.