Forum Discussion
Anonymous
7 years agoNot applicable
DAX formula error when using Addcolumn and Groupby
Hi Expert I cannot see the error here in terms of what i am doing wrong when writing the following DAX. DAX Concordant =
VAR __table = ADDCOLUMNS(VALUES(PMS_COMPLAINT[FISCAL_MON_START_DT]),"Co...
- 7 years ago
Hi Anonymous ,
Take try of this one:
Concordant = VAR __table = ADDCOLUMNS(VALUES(PMS_COMPLAINT[FISCAL_MON_START_DT]),"CountComplaints", CALCULATE(COUNTROWS(PMS_COMPLAINT)),"__Index",RANKX(PMS_COMPLAINT,PMS_COMPLAINT[FISCAL_MON_START_DT],,,Dense)) VAR __count = CALCULATE(COUNTROWS(__table),FILTER(__table,[__Index]<=MAX([__Index])&&[CountComplaints]<=MAX([CountComplaints]))) RETURN IF(ISBLANK(__count),0,__count)
v-diye-msft
7 years agoCommunity Support
Hi Anonymous ,
Take try of this one:
Concordant = VAR __table = ADDCOLUMNS(VALUES(PMS_COMPLAINT[FISCAL_MON_START_DT]),"CountComplaints", CALCULATE(COUNTROWS(PMS_COMPLAINT)),"__Index",RANKX(PMS_COMPLAINT,PMS_COMPLAINT[FISCAL_MON_START_DT],,,Dense)) VAR __count = CALCULATE(COUNTROWS(__table),FILTER(__table,[__Index]<=MAX([__Index])&&[CountComplaints]<=MAX([CountComplaints]))) RETURN IF(ISBLANK(__count),0,__count)
Anonymous
7 years agoNot applicable
many thanks -Dina
excellent feedback as always much appreciated.