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 dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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?
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 | |
63 | |
53 | |
39 | |
25 |
User | Count |
---|---|
85 | |
57 | |
45 | |
43 | |
38 |