Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin 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,
I have a series of rows in a table like the following.
Index | ID | Category |
1 | ID_1 | A |
2 | ID_2 | B |
3 | ID_3 | C |
4 | ID_4 | A |
5 | ID_4 | B |
6 | ID_5 | C |
Due to some reasons, I have to create a dummy row for each row (duplication), so that I have reference of count = 0 for each entry and its category. I have to do this to correctly show the data in a custom visual.
Index | ID | Category |
1 | ID_1 | A |
2 | ID_1 | dummy |
3 | ID_2 | B |
4 | ID_2 | dummy |
5 | ID_3 | C |
6 | ID_3 | dummy |
7 | ID_4 | A |
8 | ID_4 | dummy |
9 | ID_4 | B |
10 | ID_4 | dummy |
11 | ID_5 | C |
12 | ID_5 | dummy |
The measure I use after duplication is:
Have you tried just adding + 0 to your current expression (so that any values that were previously blank now show as 0)?
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
The issue is not related to blanks.
The reason I do the duplication is that I need a reference of count = 0 for each category count. In this way, the custom visual can compare its real count with this 0 reference. Otherwise, the custom visual won't know how to treat the colors. I use the measure I said in the visual.
Is there any other method to do this task without duplication?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
78 | |
74 | |
58 | |
41 | |
35 |
User | Count |
---|---|
67 | |
65 | |
59 | |
53 | |
47 |