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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

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
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.