Forum Discussion
DAX function check status
I want to create a DAX function to find employee count with both On-Premise and On-Clound Source via Status Column.
Please help me.
Hi, Anan ;
You could create meaure as follows:
count = CALCULATE(DISTINCTCOUNT('Table'[Source]),FILTER(ALLEXCEPT('Table','Table'[EmpID]),([Source]="On Cloud"&&[Status]=1)||([Source]="On Premise"&&[Status]=1)))both = COUNTROWS(SUMMARIZE(FILTER('Table',[count]=2),[EmpID]))The final output is shown below:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
6 Replies
- Ashish_MathurSuper User
Hi,
Try this
=calculate(distinctcount(data[EmpID]),Data[Source]="On-Premise"||Data[Source]="On-Clound")
Hope this helps.
- AnanNew Member
Thank you, but I would like to check through both On-Premise and On-Cloud Source via Status Column.
how can i do it 😥
- Ashish_MathurSuper User
Hi,
I do not understand what you mean by "via Status Column"? Please clarify.
- v-yalanwu-msftCommunity Support
Hi, Anan ;
You could create meaure as follows:
count = CALCULATE(DISTINCTCOUNT('Table'[Source]),FILTER(ALLEXCEPT('Table','Table'[EmpID]),([Source]="On Cloud"&&[Status]=1)||([Source]="On Premise"&&[Status]=1)))both = COUNTROWS(SUMMARIZE(FILTER('Table',[count]=2),[EmpID]))The final output is shown below:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.