The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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?
User | Count |
---|---|
83 | |
82 | |
34 | |
32 | |
32 |
User | Count |
---|---|
93 | |
79 | |
62 | |
54 | |
51 |