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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
Anonymous
Not applicable

Add And Function to current Formula

Hi Experts

 

having one of those days how would you add an AND function to the following formula...

 

so that the formula countrows the rows as in the contrainsrow function AND also where the values (rows) in column FTG are null too 

 

N = CALCULATE(COUNTROWS(Data),CONTAINSROW({0,1,11,12,13,14,26,28,34,36,39,43,48,49,50,52,53,54,56,57,58,62,63,69,70,71,72,73,74,75,76,77,78,79,82,84,88,89,94,121,131,132,141,144,146,147,183,186,189},Data[ID]))

1 ACCEPTED SOLUTION
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

Based on my test, you can refer to below steps:

1.I have entered some sample data.

A.PNG

N = CALCULATE(CALCULATE(COUNTROWS(Data),

                        CONTAINSROW({0,1,11,12,13,14,26,28,34,36,39,43,48,49,50,52,53,54,56,57,58,62,63,69,70,71,72,73,74,75,76,77,78,79,82,84,88,89,94,121,131,132,141,144,146,147,183,186,189},Data[ID])),

                        FILTER('Data','Data'[FTG]=BLANK()))

3.Create a Card visual and add related field, now you can see the correct result.

B.PNG

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/l28pe92d3kcavav/Add%20And%20Function%20to%20current%20Formula.pbix?dl=0

 

Regards,

Daniel He

Community Support Team _ Daniel He
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

2 REPLIES 2
v-danhe-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous,

Based on my test, you can refer to below steps:

1.I have entered some sample data.

A.PNG

N = CALCULATE(CALCULATE(COUNTROWS(Data),

                        CONTAINSROW({0,1,11,12,13,14,26,28,34,36,39,43,48,49,50,52,53,54,56,57,58,62,63,69,70,71,72,73,74,75,76,77,78,79,82,84,88,89,94,121,131,132,141,144,146,147,183,186,189},Data[ID])),

                        FILTER('Data','Data'[FTG]=BLANK()))

3.Create a Card visual and add related field, now you can see the correct result.

B.PNG

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/l28pe92d3kcavav/Add%20And%20Function%20to%20current%20Formula.pbix?dl=0

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Excellent. thanks for the feedback.

Daniel He

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.