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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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:



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.




Helpful resources

Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.