Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi all,
I have gone through some answers here that are somewhat answer to my question but not quite. For example one answer talks about computing the percentage occurance of a limited number of categories in a column with labelled text categories.
I have a list of some 200 names of objects (say firms) in a dataset of 165 rows (cases) with some object names being repeated multiple times and some rows being blank. My problem is to do the following. Any help would be highly appreciated. I understand from the problem itself that this is basic but I am very new to DAX
a) compute the percentage of times each name occurs across all cases
b) keep this percentage constant when I apply a slicer to show only a few object names in a visual
I am able to just pull the object names and apply count to get the number of times each object name occurs (frequency). But a) how do I calculate the total of the number of times across all items? So my data table is like this:
| Data | |
| Cae no | Object Name |
| 1 | L |
| 2 | N |
| 3 | K |
| 4 | D |
| 5 | W |
| 6 | Y |
| 7 | C |
| 8 | G |
| 9 | O |
| 10 | X |
| 11 | V |
| 12 | T |
| 13 | O |
| 14 | Y |
| 15 | V |
| 16 | W |
| 17 | N |
| 18 | V |
| 19 | B |
| 20 | M |
| 21 | T |
| 22 | X |
| 23 | J |
| 24 | W |
| 25 | Q |
| 26 | A |
| 27 | L |
| 28 | W |
| 29 | L |
| 30 | N |
| 31 | K |
| 32 | D |
| 33 | W |
| 34 | Y |
| 35 | C |
| 36 | G |
| 37 | O |
| 38 | X |
| 39 | V |
| 40 | T |
| 41 | O |
| 42 | Y |
| 43 | V |
| 44 | W |
| 45 | N |
| 46 | V |
| 47 | B |
| 48 | M |
| 49 | T |
| 50 | X |
| 51 | J |
| 52 | W |
| 53 | Q |
| 54 | A |
| 55 | L |
| 56 | W |
| 77 | M |
| 82 | R |
| 81 | Q |
| 79 | O |
| 80 | P |
| 78 | N |
| 67 | C |
| 90 | Z |
| 84 | T |
| 70 | F |
| 67 | C |
| 70 | F |
| 89 | Y |
| 89 | Y |
| 75 | K |
| 74 | J |
| 75 | K |
| 67 | C |
| 82 | R |
| 70 | F |
| 90 | Z |
| 73 | I |
| 75 | K |
| 69 | E |
| 68 | D |
| 88 | X |
| 65 | A |
| 71 | G |
| 67 | C |
| 67 | C |
| 83 | S |
| 67 | C |
| 69 | E |
| 76 | L |
| 69 | E |
| 72 | H |
| 77 | M |
The output required is like this:
| Sample output to be represented in a clustered column with percentages for each object name | |||||
| Object Name | Count of Object Name | Total of Counts | Percent Occurrence | ||
| L | 2 | 16 | 12.50% | Percent Occurance needs to remain constant even when slicers are applied to select fewer items | |
| N | 3 | 16 | 18.75% | ||
| K | 2 | 16 | 12.50% | ||
| C | 4 | 16 | 25.00% | ||
| D | 3 | 16 | 18.75% | ||
| M | 1 | 16 | 6.25% | ||
| J | 1 | 16 | 6.25% |
Solved! Go to Solution.
Hi,
You may download my PBI file from here.
Hope this helps.
Hi,
You may download my PBI file from here.
Hope this helps.
@Yosi , I tried creating a visual and I am not getting 2 for L, I am getting 5.
You need a measure like
divide(Count(Table[cae No]), calculate(Count(Table[cae No]), allselected() ) )
or
divide(distinctCount(Table[cae No]), calculate(distinctCount(Table[cae No]), allselected() ) )
The information you have provided is not making the problem clear to me. Can you please explain with an example.
Appreciate your Kudos.
Hi Amit,
The table at the bottom was meant as a sample of output required and not as an actual calculation from the data. I have accepted the solution by Asish Mathur as it worked for me.
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!