Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有下表:
现在,我想对该表应用一些 dax 指令,并在图表中显示这些数据:
或者换句话说,如果这个国家的名字是第一次出现,它必须显示1并且2第二次出现。
1
2
试试这个来创建一个名为的计算列Occurrences:
Occurrences
Occurrences = CALCULATE ( COUNT ( [Pais] ), FILTER ( 'Table', [Index] <= EARLIER ( 'Table'[Index] ) && [Pais] = EARLIER ( 'Table'[Pais] ) ) )
索引必须是每行中的增量键。