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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors