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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
luisfc
New Member

Listing distinct values on a filtered table

[edited for clarity]

 

I have been trying to achieve this for the last 3+ weeks. Youtube and forums have been searched through and throuhg and I haven't found an answer.

The single table I have contains Tasks, Status [Backlog|Done|Ongoing], Resolved date, associate Project and associated Program.

Programs can have 1:multiple projects and projects can have 1:multiple tasks. This is a reflection of our team's Kanban project methodology.

 

My intention is to list Programs that have tasks resolved within a given time frame, the count of other tasks that link to the same program, for each status: Done | Backlog | Ongoing.

Using a date slicer does not work as the Resolved date is empty for Status=Backlog & Ongoing, so I am using a measure and an aux Date table to filter tasks:

 

Initiative touched in the period =
var _from = FIRSTDATE('Date'[Date])
var _to = LASTDATE('Date'[Date])
return
if (SELECTEDVALUE('test data'[Resolved]) >= _from && SELECTEDVALUE('test data'[Resolved]) <= _to, 1, 0)
 

Results can then be captured in this visual table:

 

2024-02-28 07_14_48-Window.jpg

Now as I want to display the distinct Programs, I remove the other columns, keeping the filter:2024-02-28 07_16_44-Window.jpg

This is not the result I need. It clealry misses the other rows: CIS-201, CIS-203, CIS-206,...

 

Thank you in advance for your time on this!

See attached pbix here

 

 

1 REPLY 1
amitchandak
Super User
Super User

@luisfc , You need to count the project have all tasks finished on time ? Assume you have measures for the resolve time and standard time (or use static value)

Try measures like

 

 

On Time Task = countx(Values(Table[Task]),if([resolve time] <=[Std Time], [Task], blank() ) )

 

 

Total Task = countrows(Values(Table[Task]))


On Time projects = countx(Values(Table[Project]),if([On Time Task] =[Total Task], [Project], blank()))

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

Check out the October 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.

October NL Carousel

Fabric Community Update - October 2024

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