Forum Discussion
wangjuan303
3 years agoHelper III
How to filter data from Dax
I have a report like under the screenshot, ID will have a different status, Want to create a measure to count ID that not including a "Reject" status record, The highlighted column is what I need,...
- 3 years ago
maybe you can try this
approve count = VAR _reject=countx(FILTER(all('Table'),'Table'[ID]=max('Table'[ID])&&'Table'[status]="reject"),'Table'[ID]) return if(ISBLANK(_reject),1)pls see the attachment below
- 3 years ago
Hi,
This measure works
Measure = COUNTROWS(FILTER(VALUES('Table'[ID]),CALCULATE(COUNTROWS('Table'),'Table'[status]="approve")>=1&&CALCULATE(COUNTROWS('Table'),'Table'[status]="reject")=0))Hope this helps.
wangjuan303
3 years agoHelper III
Here is example file link, Thank you Ashish_Mathur : https://www.dropbox.com/scl/fi/b75dq0ux1p8dwf8xv8kir/filterdatafromdax.pbix?dl=0&rlkey=i1jo0hm567u0gl717a2hs4eyp
Ashish_Mathur
3 years agoSuper User
Hi,
This measure works
Measure = COUNTROWS(FILTER(VALUES('Table'[ID]),CALCULATE(COUNTROWS('Table'),'Table'[status]="approve")>=1&&CALCULATE(COUNTROWS('Table'),'Table'[status]="reject")=0))
Hope this helps.