Dax从Rankx测量获得单秩结果

时间:2019-05-13 10:34:28

标签: powerbi dax

如何从rankx测量中获得单个结果,例如,我需要“ Test3”的结果,在这种情况下为3。

theEvent(e){
  if(e.key==='Enter'){
    this.setState({newTypePredefinedValue: ''});
    this.setState({readOnly:true})
    this.forceUpdate();

    fetch(..., { ... })
      .then(() => this.componentDidMount() )
      .then(this.setState({readOnly:false}))
      .then(this.forceUpdate());
  }
}

结果:

DAX formula for rank: =
RANKX(
   ALLSELECTED(CompetitionComp);
   CALCULATE(
       SUM(CompetitionComp[Base price WS])
   )
)

1 个答案:

答案 0 :(得分:0)

我不确定这是否是您想要的:

DAX formula for rank 3: =
VAR _rank_3 = RANKX(
   ALLSELECTED(CompetitionComp);
   CALCULATE(
       SUM(CompetitionComp[Base price WS])
   )
)

RETURN IF(_rank_3 = 3, SUM(CompetitionComp[Base price WS]) )