Forum Discussion
Perform Measure on Matrix Values
I have a dataset similar to...
| Person 1 | Active |
| Person 2 | Active |
| Person 3 | |
| Person 4 | Active |
| Person 5 | |
| Person 6 |
The a Matrix Visual similar to...
| Person 1 | Active |
| Person 3 | |
| Person 5 | |
| Person 6 |
I need to get the percentage of non-empty row displayed in the matrix. So as there are 1 row with "Active" and 3 rows that are Empty, the card visual should show 75%. Can you perform calculation on matrxi visuals?
Hi StuartSmith ,
Please refer to my .pbix file.
Note: First copy and paste the table data(2), then unpivot columns '4G', '5G', 'Esim', 'Porting', then you can get table 'date(3)'.
Best regards,
Lionel ChenIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
8 Replies
- StuartSmithPower Participant
The Matrix is set like this.
And I want to have a card, pie chart, etc showing the percentage of rows (Matrix values) that are not blank. Bearing in mind, the matrix only contains a sub-set of the data set, so unable to simply count all the rows of the dataset and calculate the percentage that are empty.
Hope that makes sense.
- amitchandakSuper User
StuartSmith , Try like
divide(calculate(countrows(Table), filter(Table,isblank[Active])),countrows(Table))
or
divide(calculate(countrows(Table), filter(Table, not(isblank[Active]))),countrows(Table))
- StuartSmithPower Participant
Thanks, but get...
- StuartSmithPower Participant
Whats "Active" as tried googling it and cant find anything about it.