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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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