Forum Discussion
Count Measure from 3 Column
Hi good day can someone help me on my measure, i want to count the total Active from Active/Inactive column,
Trade Column = FWL
used_BASE/INJECTED = BASE
RESULT
Thank you
Hey AllanBerces,
Based on your requirement to count records where Active/Inactive = "Active", Trade = "FWL", and used_BASE/INJECTED = "BASE", here is the solution:
DAX Measure Solution
Create a new measure with the following DAX formula:
Count of Active FWL BASE =
CALCULATE(
COUNT('YourTableName'[used_BASE/INJECTED]),
'YourTableName'[Active/Inactive] = "Active",
'YourTableName'[Trade] = "FWL",
'YourTableName'[used_BASE/INJECTED] = "BASE"
)Step-by-Step Implementation
- Open Power BI Desktop and navigate to your report
- Select the table containing your data in the Fields pane
- Right-click on the table name and choose "New Measure"
- Replace the default formula with the DAX code above
- Update the table name - Replace 'YourTableName' with your actual table name
- Press Enter to create the measure
Key Points to Remember
- CALCULATE function applies filters to modify the context of the COUNT operation
- Multiple filter conditions are applied using comma separation (AND logic)
- Exact text matching is used for all three columns - ensure your data doesn't have extra spaces
- Case sensitivity matters - verify the exact spelling and capitalization in your data
Alternative Approach Using COUNTROWS
If you prefer using COUNTROWS instead of COUNT:
Count of Active FWL BASE =
COUNTROWS(
FILTER('YourTableName',
'YourTableName'[Active/Inactive] = "Active" &&
'YourTableName'[Trade] = "FWL" &&
'YourTableName'[used_BASE/INJECTED] = "BASE"
)
)Verification Steps
- Check your result should show 17 as per your expected output
- Validate data types ensure all columns are text/string format
- Review filter conditions confirm there are no trailing spaces or formatting issues
- Test the measure in a card visual or table to verify accuracy
This measure will dynamically count all rows meeting your three specified criteria and update automatically when filters are applied to your report.
Fixed? ✓ Mark it • Share it • Help others!
Best Regards,
Jainesh Poojara | Power BI DeveloperTotal Active & FWL‑BASE =
CALCULATE(
COUNTROWS('YourTableName'),
'YourTableName'[Active/Inactive] = "Active",
'YourTableName'[Trade] = "FWL used_BASE/INJECTED = BASE"
)
5 Replies
- jaineshpMemorable Member
Hey AllanBerces,
Based on your requirement to count records where Active/Inactive = "Active", Trade = "FWL", and used_BASE/INJECTED = "BASE", here is the solution:
DAX Measure Solution
Create a new measure with the following DAX formula:
Count of Active FWL BASE =
CALCULATE(
COUNT('YourTableName'[used_BASE/INJECTED]),
'YourTableName'[Active/Inactive] = "Active",
'YourTableName'[Trade] = "FWL",
'YourTableName'[used_BASE/INJECTED] = "BASE"
)Step-by-Step Implementation
- Open Power BI Desktop and navigate to your report
- Select the table containing your data in the Fields pane
- Right-click on the table name and choose "New Measure"
- Replace the default formula with the DAX code above
- Update the table name - Replace 'YourTableName' with your actual table name
- Press Enter to create the measure
Key Points to Remember
- CALCULATE function applies filters to modify the context of the COUNT operation
- Multiple filter conditions are applied using comma separation (AND logic)
- Exact text matching is used for all three columns - ensure your data doesn't have extra spaces
- Case sensitivity matters - verify the exact spelling and capitalization in your data
Alternative Approach Using COUNTROWS
If you prefer using COUNTROWS instead of COUNT:
Count of Active FWL BASE =
COUNTROWS(
FILTER('YourTableName',
'YourTableName'[Active/Inactive] = "Active" &&
'YourTableName'[Trade] = "FWL" &&
'YourTableName'[used_BASE/INJECTED] = "BASE"
)
)Verification Steps
- Check your result should show 17 as per your expected output
- Validate data types ensure all columns are text/string format
- Review filter conditions confirm there are no trailing spaces or formatting issues
- Test the measure in a card visual or table to verify accuracy
This measure will dynamically count all rows meeting your three specified criteria and update automatically when filters are applied to your report.
Fixed? ✓ Mark it • Share it • Help others!
Best Regards,
Jainesh Poojara | Power BI Developer- AllanBercesPost Prodigy
Hi jaineshp swathigouda thank you very much working perfectly
- swathigoudaRegular Visitor
Total Active & FWL‑BASE =
CALCULATE(
COUNTROWS('YourTableName'),
'YourTableName'[Active/Inactive] = "Active",
'YourTableName'[Trade] = "FWL used_BASE/INJECTED = BASE"
) - jaineshpMemorable Member
Hey AllanBerces
Thank you for the kind recognition - always happy to contribute to our community's success!
Best Regards,
Jainesh Poojara | Power BI Developer - mdaatifraza5556Super User
Hi AllanBerces
Can you please try the below dax to get you result ?Count =CALCULATE (COUNTROWS ( 'data' ),'data'[Trade] = "FWL",'data'[Active/Inactive] = "Active",'data'[CASE BASE/RESTRICTED] = "BASE")If this answers your questions, kindly accept it as a solution and give kudos.