Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
Im trying to create a visualization wherein it will take the number of IDs and divide it by the total items (by using count distinct). For example:
Number of IDs | Total items | Percentage | |
Category A | 200 | 300 | 67% |
Category B | 100 | 300 | 33% |
The problem is that when I try to divide them using the DIVIDE(DISTINCTCOUNT('table'[ID]), DISTINCTCOUNT('table'[items])), it just filters the number of items something like this:
Number of IDs | Total items | Percentage | |
Category A | 200 | 120 | 1.67% |
Category B | 100 | 60 | 1.67% |
Is there a way to create a calculation that will get the total items despite the Number of IDs having filters? I will be using a slicer to change the numbers per month as well.
Thank you.
Solved! Go to Solution.
Hi @kdc02 ,
According to your sharing sample, here are my test process
To achieve your goal, you can follow these steps:
Here are my test data
1.Create a measure by using DAX
Number of IDs = COUNT('Table'[ID])
total of items = COUNTROWS(ALLSELECTED('Table'))
Percentage = DIVIDE([Number of IDs],[total of items])
2.Create a Slicer by using month
3.Final output
I hope my solution can help you, but if it doesn’t, don’t worry. You can always share your thoughts and feedback with me by posting a comment below this post.
In order for you to solve the problem faster, you can refer to the following documentation
How to Get Your Question Answered Quickly - Microsoft Fabric Community
Best Regards,
Albert He
Hi @kdc02 ,
According to your sharing sample, here are my test process
To achieve your goal, you can follow these steps:
Here are my test data
1.Create a measure by using DAX
Number of IDs = COUNT('Table'[ID])
total of items = COUNTROWS(ALLSELECTED('Table'))
Percentage = DIVIDE([Number of IDs],[total of items])
2.Create a Slicer by using month
3.Final output
I hope my solution can help you, but if it doesn’t, don’t worry. You can always share your thoughts and feedback with me by posting a comment below this post.
In order for you to solve the problem faster, you can refer to the following documentation
How to Get Your Question Answered Quickly - Microsoft Fabric Community
Best Regards,
Albert He
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
63 | |
59 | |
56 | |
38 | |
29 |
User | Count |
---|---|
82 | |
62 | |
45 | |
41 | |
40 |