graphistry / graphbi

Graphistry monorepo for BI integrations
0 stars 0 forks source link

column names mixed up #85

Open lmeyerov opened 1 year ago

lmeyerov commented 1 year ago

Notice Age Group and Employment Type below -- their values appear swapped

Screenshot from 2022-11-01 23-33-59

lmeyerov commented 1 year ago

@dm-p would you mind taking a look at this one? I encountered it on your branch for the pbi HR report dataset

dm-p commented 1 year ago

Hi @lmeyerov - by way of an interim update, I've tested this both on my checkout (prior to updating for recent changes against master), and afterwards, and both look correct, based on the configuration from your above screenshot, e.g.:

image

However, I've noticed that in this case, we have Age Group in both the Source and Source node properties data roles, as well as Employment Type in both the Source node properties and Edge properties data roles, we get the value sets twice in the sourcePropertyMetadata object. As such, Power BI maps them twice in the data view, e.g.:

image

If I remove one of the duplicate fields from the pane (e.g. Employment Type from Edge properties), then we see one less array element here, e.g.:

image

Because we filter by role name when retrieving values, both of these instances overlap, and are being doubled-up (or potentially more if used in other data roles). Therefore, it's likely that I'm just not adding them in the same order that you might have done, to be able to successfully reproduce (and still cannot).

Either way, this is likely the issue and I will ensure that only the first value array is retrieved from the data view if it is assigned to multiple data roles.