我有以下测量表:
================================== |DateKey |Client|VoucherID|Amount| ================================== |20170101|A |V1 |100 | |20170108|A |V1 |120 | |20170109|A |V2 |150 | |20170111|A |V2 |130 | |20170120|B |V3 |210 | |20170210|A |V1 |110 | |20170215|A |V4 |200 | ==================================
它与客户和日期维度有关。如何创建计算度量,以便在Excel中创建数据透视表时,每个时间段内仅计算最新不同凭证的数量,如下表所示:
============================= |Month |Client|Amount| ============================= |January 2017 |A |250 | Only sums the latest V1 and V2 (120 + 130) |January 2017 |B |210 | |February 2017|A |310 | =============================
提前谢谢。
答案 0 :(得分:0)
你能用LastNonEmpty实现这个吗?