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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
dd88
Post Patron
Post Patron

Obtain Total/Count on multiple conditions

Table View has a column LONG TERM PLACEMENT 1 and contains a mix of data.


I want to obtain the total of real data. therefore to count and not include the following NO PLACEMENT, N/A, blank.
So far I am unsuccessful in calculated column, or power query.

How can this be achieved please.

 

Obtain total on muptiple conditions.png

 

 

 

TIA

 

1 ACCEPTED SOLUTION
vicky_
Super User
Super User

If you don't need the blank, no placement and NA rows anymore, then filter them out in PQ. 

= Table.SelectRows(Source, each ([LONG TERM PLACEMENT 1 ] <> "" and LONG TERM PLACEMENT 1 <> "NA" and LONG TERM PLACEMENT 1 <> "NO PLACEMENT"))

 You'll need to swap out Source for whatever your previous step was, or just modify the code in the formula bar.

 

If you need those rows, then there are ways to do it with either DAX or filters. 
You can consider using LONG TERM PLACEMENT 1 in a slicer and deselecting those unwanted values. Or, using DAX, something like:

Measure = CALCULATE(COUNTROWS(Table), FILTER(Table, 
    Table[LONG TERM PLACEMENT 1] not IN {"", "NO PLACEMENT", "N/A"})
)

 

View solution in original post

1 REPLY 1
vicky_
Super User
Super User

If you don't need the blank, no placement and NA rows anymore, then filter them out in PQ. 

= Table.SelectRows(Source, each ([LONG TERM PLACEMENT 1 ] <> "" and LONG TERM PLACEMENT 1 <> "NA" and LONG TERM PLACEMENT 1 <> "NO PLACEMENT"))

 You'll need to swap out Source for whatever your previous step was, or just modify the code in the formula bar.

 

If you need those rows, then there are ways to do it with either DAX or filters. 
You can consider using LONG TERM PLACEMENT 1 in a slicer and deselecting those unwanted values. Or, using DAX, something like:

Measure = CALCULATE(COUNTROWS(Table), FILTER(Table, 
    Table[LONG TERM PLACEMENT 1] not IN {"", "NO PLACEMENT", "N/A"})
)

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.