Excel Power查询编号到文本
我正在尝试解析JSON文件,但是该文件是以一种奇怪的方式设置的,Excel正在遇到问题。请参阅下面的代码示例。
"in_network":
[
{
"negotiation_arrangement": "ffs",
"name": "CT Scan",
"billing_code_type": "X",
"billing_code_type_version": "2022",
"billing_code": "XXXX",
"description": "CT Scan",
"negotiated_rates": [
{
"provider_references": [
380.39
],
"negotiated_prices": [
{
"negotiated_type": "percentage",
"negotiated_rate": 4.00,
"expiration_date": "9999-99-99",
"service_code": [
"99"
],
"billing_class": "Ultra",
"billing_code_modifier": []
}
]
},
{
"provider_references": [
380.6
],
"negotiated_prices": [
{
"negotiated_type": "percentage",
"negotiated_rate": 2.00,
"expiration_date": "9999-99-99",
"service_code": [
"99"
],
"billing_class": "Ultra",
"billing_code_modifier": []
}
]
}
]
有一个名为Provider_references的字段,该电源查询是读取为数字数据类型的。该字段有一些行,条目380.6和一些行,条目为380.60。 Excel将380.6和380.60行读取为380.6。 。我试图将Power查询编辑器中的数据类型更改为文本,认为这可以解决问题,但是Excel仍然无法区分这两个条目,并继续将380.6和380.60 Group_ids汇总在一起。有没有办法确保在解析JSON文件时捕获Provider_References字段有任何略有差异?
进行
的 | 6 | 个 |
---|---|---|
2.00 | 百分比 | 。 |
JSON | 2.00 | 百分比 |
380.6 | 是 | 这 |
应对 | | |
方式
解析 | 文件 | |
---|---|---|
| | |
| | |
| | |
| | |
{
"reporting_entity_name": "test",
"reporting_entity_type": "testr",
"last_updated_on": "2022-05-05",
"version": "1.0.0",
"provider_references": [
{
"provider_group_id": 380.1,
"provider_groups": [
{
"npi": [
9999999999
],
"tin": {
"type": "ein",
"value": "57-999999999"
}
}
]
}
],
"in_network": [
{
"negotiation_arrangement": "ffs",
"name": "test",
"billing_code_type": "RC",
"billing_code_type_version": "2022",
"billing_code": "xxxx",
"description": "test",
"negotiated_rates": [
{
"provider_references": [
380.61
],
"negotiated_prices": [
{
"negotiated_type": "negotiated",
"negotiated_rate": 0.00,
"expiration_date": "9999-12-31",
"service_code": [
"22"
],
"billing_class": "institutional",
"billing_code_modifier": []
}
]
}
]
},
{
"negotiation_arrangement": "ffs",
"name": "test",
"billing_code_type": "RC",
"billing_code_type_version": "2022",
"billing_code": "zzzz",
"description": "test",
"negotiated_rates": [
{
"provider_references": [
380.60
],
"negotiated_prices": [
{
"negotiated_type": "negotiated",
"negotiated_rate": 105.00,
"expiration_date": "9999-12-31",
"service_code": [
"22"
],
"billing_class": "institutional",
"billing_code_modifier": ["00"
]
}
]
}
]
}
]
}
I'm trying to parse a json file but the file is set up in a strange way that excel is having problems deciphering. Please see code example below.
"in_network":
[
{
"negotiation_arrangement": "ffs",
"name": "CT Scan",
"billing_code_type": "X",
"billing_code_type_version": "2022",
"billing_code": "XXXX",
"description": "CT Scan",
"negotiated_rates": [
{
"provider_references": [
380.39
],
"negotiated_prices": [
{
"negotiated_type": "percentage",
"negotiated_rate": 4.00,
"expiration_date": "9999-99-99",
"service_code": [
"99"
],
"billing_class": "Ultra",
"billing_code_modifier": []
}
]
},
{
"provider_references": [
380.6
],
"negotiated_prices": [
{
"negotiated_type": "percentage",
"negotiated_rate": 2.00,
"expiration_date": "9999-99-99",
"service_code": [
"99"
],
"billing_class": "Ultra",
"billing_code_modifier": []
}
]
}
]
There is a field called provider_references, that power query is reading as a number data type. This field has some rows with the entry 380.6 and some rows with an entry of 380.60. Excel is reading both 380.6 and 380.60 lines as 380.6. . I tried to change the data type in Power Query Editor to text, thinking this would solve the problem, but excel is still not able to differentiate between the two entries and continues to lump the 380.6 and 380.60 Group_IDs together. Is there a way to ensure that any slight differences in the provider_references field gets captured when parsing the json file?
This is how the json file should be parsed
provider_references | Negotiated_type | negotiated_rate |
---|---|---|
380.60 | percentage | 2.00 |
380.60 | percentage | 2.00 |
380.6 | percentage | 2.00 |
380.6 | percentage | 2.00 |
But this is how power query is actually parsing the file
provider_references | Negotiated_type | negotiated_rate |
---|---|---|
380.6 | percentage | 2.00 |
380.6 | percentage | 2.00 |
380.6 | percentage | 2.00 |
380.6 | percentage | 2.00 |
{
"reporting_entity_name": "test",
"reporting_entity_type": "testr",
"last_updated_on": "2022-05-05",
"version": "1.0.0",
"provider_references": [
{
"provider_group_id": 380.1,
"provider_groups": [
{
"npi": [
9999999999
],
"tin": {
"type": "ein",
"value": "57-999999999"
}
}
]
}
],
"in_network": [
{
"negotiation_arrangement": "ffs",
"name": "test",
"billing_code_type": "RC",
"billing_code_type_version": "2022",
"billing_code": "xxxx",
"description": "test",
"negotiated_rates": [
{
"provider_references": [
380.61
],
"negotiated_prices": [
{
"negotiated_type": "negotiated",
"negotiated_rate": 0.00,
"expiration_date": "9999-12-31",
"service_code": [
"22"
],
"billing_class": "institutional",
"billing_code_modifier": []
}
]
}
]
},
{
"negotiation_arrangement": "ffs",
"name": "test",
"billing_code_type": "RC",
"billing_code_type_version": "2022",
"billing_code": "zzzz",
"description": "test",
"negotiated_rates": [
{
"provider_references": [
380.60
],
"negotiated_prices": [
{
"negotiated_type": "negotiated",
"negotiated_rate": 105.00,
"expiration_date": "9999-12-31",
"service_code": [
"22"
],
"billing_class": "institutional",
"billing_code_modifier": ["00"
]
}
]
}
]
}
]
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Excel无法区分这两个条目,因为JSON并未将项目引用以使其成为标签,并且将其评估为
我无法获得该样本以适当评估有效JSON的数字。假设您可以,这可能对您有用。它在下面的行中添加了引用和尾随的引号[包含 provider_references 的行]
Excel is not able to differentiate between the two entries, because the JSON is not putting the item in quotes to make it a label and it is evaluated as a number
I can't get that sample to evaluate properly as valid JSON. Assuming you can, this probably will work for you. It adds the leading and trailing quotes to the row below [the row that contains provider_references]