Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anan
New Member

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.

Anan_0-1648001499985.png

 

Please help me. 

1 ACCEPTED SOLUTION
v-yalanwu-msft
Community Support
Community 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:

vyalanwumsft_0-1648454933808.png


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.

View solution in original post

6 REPLIES 6
v-yalanwu-msft
Community Support
Community 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:

vyalanwumsft_0-1648454933808.png


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.

Ashish_Mathur
Super User
Super User

Hi,

Try this

=calculate(distinctcount(data[EmpID]),Data[Source]="On-Premise"||Data[Source]="On-Clound")

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thank you, but I would like to check through both On-Premise and On-Cloud Source via Status Column.

 

how can i do it 😥

Hi,

I do not understand what you mean by "via Status Column"?  Please clarify.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

For example, EmpID AGA28 On-Cloud Status equals 0(No) and On-Premise equals 1(Yes)

Anan_0-1648007081315.png

And I want to count employees who have both On-Premise and On-Cloud Source via Status Column.

 

Hi,

I assume you want to count Emp ID where Source is On Cloud and On premise and each has a value of 1.  Am i correct?  If yes, then share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.