简体   繁体   English

Excel 表格切片器 - 不同的行数

[英]Excel Table Slicer - Distinct count of rows

I am trying to slice and dice my data set and I got one strange "issue", I actually cant do distinct count which is gonna change values when I choose something on slicer.我正在尝试对我的数据集进行切片和切块,但我遇到了一个奇怪的“问题”,我实际上无法进行不同的计数,当我在切片器上选择某些内容时,这会改变值。 if I select year 2020 or 2019 it is giving always the total numbers of values and specific values for certain year.如果我选择 2020 年或 2019 年,它总是给出特定年份的值和特定值的总数。 I know I can do it in Pivot tables but for now I am just in normal excel table format.我知道我可以在数据透视表中做到这一点,但现在我只是使用普通的 excel 表格格式。 Is there a way to workaround to make it more dynamic?有没有办法让它更具动态性?

I am using this formula:我正在使用这个公式:

=SUMPRODUCT(1/COUNTIF(Ism_V[Charge (CS)];Ism_V[Charge (CS)]))

数据摘录

I found this to work.我发现这有效。 Make this an array formula (SHFT-CTRL-ENTER) after entering it.输入后将其设为数组公式 (SHFT-CTRL-ENTER)。 Returned counts are distinct values.返回的计数是不同的值。

    =SUM(--(FREQUENCY(IF(SUBTOTAL(3,  OFFSET(Table1[Another],  MATCH(ROW(Table1[Another]),  ROW(Table1[Another]))-1,  0,  1)), COUNTIF(Table1[Another], "<"&Table1[Another]), ""), COUNTIF(Table1[Another], "<"&Table1[Another]))>0))

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM