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.
My dataset contains a table with support tickets: Ticket. This table contains a date-field: CreatedDate. Each Ticket has a corresponding Project (Relationship: Ticket.ProjectId-Project.ProjectId). A project can be completed. In this case Project.CompletedDate gets filled in.
I have made a card visual showing the total amount of Tickets created (Using a date table). I have used a slicer for this (relative date slicer, say: last 7 days). Now, I want to create a new card displaying the total amount of completed Tickets within these 7 days (count tickets joining on ProjectId where Project.Completeddate = within 7 days). I want to use that same slicer for that.
I can't really figure out how to achieve this, since I am fairly new to Power Bi.
I hope I've made my problem clear...
Thanks in advance
@Anonymous create a relationship between date table and completed date, it will be an inactive relationship because you already have a relationship on create date and inactive relationship is ok, add the following measure for completed tasks count
Completed Count =
CALCUALATE ( COUNTROWS ( TicketTable ),
USERELATIONSHIP ( TicketTable[CompletedDate], DateTable[Date] ),
TicketTable[CompletedDate] <> BLANK()
)
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
I Don't really understand how this works and my own DAX formula doesn't XD.
Thanks a lot!
And I was wondering: If I wanted to create a card showing me all tickets that have been created (Ticket.CreatedDate) AND completed (Project.CompletedDate) within these 7 days, how would I do that? Because then I would need to use both relationships in one formula it seems...
Hi @Anonymous ,
Could you please provide some sample data(exclude sensitive data) in table Ticket and Project? Then we can provide you the measures or sample pbix file which suitable for your scenario.
In addition, you can refer the contents in the following links to achieve it.
POWER BI AND DAX – USERELATIONSHIP TO WORK WITH MULTIPLE DATES
Calculate Transactions In Last N Days in Power BI Using DAX
Measure for count of last 7 days
Best Regards
Rena
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
97 | |
80 | |
67 | |
63 |
User | Count |
---|---|
147 | |
110 | |
108 | |
85 | |
64 |