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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

calculate specific names from column powerbi using measure

Hi all ,

 i need to calculate specific names from column powerbi using measure.

ex: let's say table name is "Table1" and column "B" has ten distinct text values and i need to get the count of 3 values.

 

getting the count of one specific value.

 

measureA= CALCULATE ( COUNTROWS ( Table1), Table1[B] = "aaa" )
 
But how do i calculate this with three or more specific values.lets day i need to include "bbb" ,"ccc","ddd".
 
i tried with below query but it didnt give the expected results.
 
measureA= CALCULATE ( COUNTROWS ( Table1), (Table1[B] = "aaa" && Table1[B] = "bbb" && Table1[B] = "ccc") )
 
 
 
1 ACCEPTED SOLUTION
ddpl
Solution Sage
Solution Sage

@Anonymous 

try like below,

 

measureA= CALCULATE ( COUNTROWS ( Table1), Table1[B] in {"aaa" , "bbb", "ccc"} )

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

It works. Thank you very much mate !!!

ddpl
Solution Sage
Solution Sage

@Anonymous 

try like below,

 

measureA= CALCULATE ( COUNTROWS ( Table1), Table1[B] in {"aaa" , "bbb", "ccc"} )

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.