March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I'm trying to use a matrix visual to display two columns of data and the 3rd column would be the percentage of the two.
Here's my table named Tasks:
TaskID | AuthorID | CompletedByID | CompletedByDate | IsAssignedToAuthor |
1001 | 5 | 45 | 2023-02-03 | true |
1002 | 10 | 50 | 2023-02-03 | true |
1003 | 14 | 45 | 2023-02-03 | false |
1004 | 6 | 40 | 2023-02-04 | true |
1005 | 10 | 50 | 2023-02-04 | true |
1006 | 14 | 50 | 2023-02-05 | true |
1007 | 22 | 45 | 2023-02-05 | false |
1008 | 5 | 40 | 2023-02-05 | true |
1009 | 13 | 50 | 2023-02-06 | true |
1010 | 21 | 45 | 2023-02-06 | false |
1011 | 22 | 50 | 2023-02-06 | false |
1012 | 23 | 45 | 2023-02-06 | false |
1013 | 14 | 40 | 2023-02-07 | true |
1014 | 13 | 40 | 2023-02-07 | false |
1015 | 10 | 45 | 2023-02-07 | false |
I created a meaure off the IsAssignedToUser column named CountNonAssignedUserTask. Here is the code:
CountNonAssignedUserTask =
CALCULATE(
COUNTA(Tasks[TaskID]),
Tasks[IsAssignedToAuthor]
IN { FALSE }
)
I'd like the matrix to look like the following:
The matrix is linked to a date slicer, so the values would change based on a date range.
For the matrix visual, I have "Completed By" in the Rows section and under Values, I have "Total Tasks" is a count of the TaskID column, and "Tasks for NonAssigned Users" is a count of the IsAssignedToAuthor column.
I'm a DAX novice. I've searched for various approaches and tried numerous examples but cannot get the result I need for the percent column.
Could you please direct me to the best approach to solve my problem.
Thanks.
Solved! Go to Solution.
Dear @tknoob_am ,
below is a sample file of power bi.
https://drive.google.com/file/d/12bf3TdPMPm2gP-O_yTuJoGmRaaW2VEJ0/view?usp=sharing
please let me know if that what you want.
see attached
https://1drv.ms/u/s!AiUZ0Ws7G26RhiND7H7ciTqCzeWM?e=eNJpnq
Total Task =
COUNTROWS('Table')
CountNonAssignedUserTask =
CALCULATE([Total Task],'Table'[IsAssignedToAuthor]=FALSE)
Percent Completed for NonAssigned Users =
DIVIDE([CountNonAssignedUserTask],[Total Task])
see attached
https://1drv.ms/u/s!AiUZ0Ws7G26RhiND7H7ciTqCzeWM?e=eNJpnq
Total Task =
COUNTROWS('Table')
CountNonAssignedUserTask =
CALCULATE([Total Task],'Table'[IsAssignedToAuthor]=FALSE)
Percent Completed for NonAssigned Users =
DIVIDE([CountNonAssignedUserTask],[Total Task])
Dear @tknoob_am ,
below is a sample file of power bi.
https://drive.google.com/file/d/12bf3TdPMPm2gP-O_yTuJoGmRaaW2VEJ0/view?usp=sharing
please let me know if that what you want.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
114 | |
76 | |
57 | |
52 | |
44 |
User | Count |
---|---|
167 | |
117 | |
63 | |
57 | |
50 |