powerbi 不为空怎么表示
发布网友
发布时间:2022-04-24 02:51
我来回答
共1个回答
热心网友
时间:2023-10-22 22:30
好的,所以我正在尝试构建一个图例,并且一些值从传入的数据中空白(将其标记为未分类)。 但是,空白值未被正确解析。 我尝试了许多组合,并尝试搜索这个答案很长一段时间,现在越来越绝望。
我意识到这可能有点混乱,但我刚刚测试过,对不起。
let legendData = categories[1] ? categories[1].values : [];
global.legend.values = [];
let last: any = "";
// The toString().length of the blank one is 3.... And it is not null, '', or " "
legendData.forEach((value) => {
if (value && value != last){global.legend.values.push(value);}
last = value;
console.log(value);
});
再次,我试图只获取global.legend.values中不为null的所有值。 然而,当我打印出global.legend.values中的每个元素时,那些讨厌的空白都有自己的行。 导入的Excel文件中的值为空,在DataView中以蓝色文本显示为空,并且该console.log(value); 还打印出空白以及...
value.toString()。长度是3,这也是令人困惑的。 我可能会错过什么? 我感谢所有帮助。
OK, so I am trying to build a legend, and some values are blank from the incoming data (was going to mark this as uncategorized). However, the blank values are not being parsed correctly. I tried MANY combinations and tried searching for this answer for quite some time now and am getting desperate.
I realize this may be a little messy but I've just been testing it out, sorry.
let legendData = categories[1] ? categories[1].values : [];
global.legend.values = [];
let last: any = "";
// The toString().length of the blank one is 3.... And it is not null, '', or " "
legendData.forEach((value) => {
if (value && value != last){global.legend.values.push(value);}
last = value;
console.log(value);
});
So again, I am trying to get only all values that are NOT null in global.legend.values. When I print out every element in global.legend.values, however, those pesky blanks are there with their own line each. The value is blank in the imported Excel file, showing up as null in blue text in the DataView, and that console.log(value); is printing out null as well...
value.toString().length is 3, which is also confusing. What could I be missing? I appreciate all help.
热心网友
时间:2023-10-22 22:31
好的,所以我正在尝试构建一个图例,并且一些值从传入的数据中空白(将其标记为未分类)。 但是,空白值未被正确解析。 我尝试了许多组合,并尝试搜索这个答案很长一段时间,现在越来越绝望。
我意识到这可能有点混乱,但我刚刚测试过,对不起。
let legendData = categories[1] ? categories[1].values : [];
global.legend.values = [];
let last: any = "";
// The toString().length of the blank one is 3.... And it is not null, '', or " "
legendData.forEach((value) => {
if (value && value != last){global.legend.values.push(value);}
last = value;
console.log(value);
});
再次,我试图只获取global.legend.values中不为null的所有值。 然而,当我打印出global.legend.values中的每个元素时,那些讨厌的空白都有自己的行。 导入的Excel文件中的值为空,在DataView中以蓝色文本显示为空,并且该console.log(value); 还打印出空白以及...
value.toString()。长度是3,这也是令人困惑的。 我可能会错过什么? 我感谢所有帮助。
OK, so I am trying to build a legend, and some values are blank from the incoming data (was going to mark this as uncategorized). However, the blank values are not being parsed correctly. I tried MANY combinations and tried searching for this answer for quite some time now and am getting desperate.
I realize this may be a little messy but I've just been testing it out, sorry.
let legendData = categories[1] ? categories[1].values : [];
global.legend.values = [];
let last: any = "";
// The toString().length of the blank one is 3.... And it is not null, '', or " "
legendData.forEach((value) => {
if (value && value != last){global.legend.values.push(value);}
last = value;
console.log(value);
});
So again, I am trying to get only all values that are NOT null in global.legend.values. When I print out every element in global.legend.values, however, those pesky blanks are there with their own line each. The value is blank in the imported Excel file, showing up as null in blue text in the DataView, and that console.log(value); is printing out null as well...
value.toString().length is 3, which is also confusing. What could I be missing? I appreciate all help.
热心网友
时间:2023-10-22 22:31
好的,所以我正在尝试构建一个图例,并且一些值从传入的数据中空白(将其标记为未分类)。 但是,空白值未被正确解析。 我尝试了许多组合,并尝试搜索这个答案很长一段时间,现在越来越绝望。
我意识到这可能有点混乱,但我刚刚测试过,对不起。
let legendData = categories[1] ? categories[1].values : [];
global.legend.values = [];
let last: any = "";
// The toString().length of the blank one is 3.... And it is not null, '', or " "
legendData.forEach((value) => {
if (value && value != last){global.legend.values.push(value);}
last = value;
console.log(value);
});
再次,我试图只获取global.legend.values中不为null的所有值。 然而,当我打印出global.legend.values中的每个元素时,那些讨厌的空白都有自己的行。 导入的Excel文件中的值为空,在DataView中以蓝色文本显示为空,并且该console.log(value); 还打印出空白以及...
value.toString()。长度是3,这也是令人困惑的。 我可能会错过什么? 我感谢所有帮助。
OK, so I am trying to build a legend, and some values are blank from the incoming data (was going to mark this as uncategorized). However, the blank values are not being parsed correctly. I tried MANY combinations and tried searching for this answer for quite some time now and am getting desperate.
I realize this may be a little messy but I've just been testing it out, sorry.
let legendData = categories[1] ? categories[1].values : [];
global.legend.values = [];
let last: any = "";
// The toString().length of the blank one is 3.... And it is not null, '', or " "
legendData.forEach((value) => {
if (value && value != last){global.legend.values.push(value);}
last = value;
console.log(value);
});
So again, I am trying to get only all values that are NOT null in global.legend.values. When I print out every element in global.legend.values, however, those pesky blanks are there with their own line each. The value is blank in the imported Excel file, showing up as null in blue text in the DataView, and that console.log(value); is printing out null as well...
value.toString().length is 3, which is also confusing. What could I be missing? I appreciate all help.