Forum Discussion
Count Measure from 3 Column
- 1 year ago
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 - 1 year ago
Total Active & FWL‑BASE =
CALCULATE(
COUNTROWS('YourTableName'),
'YourTableName'[Active/Inactive] = "Active",
'YourTableName'[Trade] = "FWL used_BASE/INJECTED = BASE"
)
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
- AllanBerces1 year agoPost Prodigy
Hi jaineshp swathigouda thank you very much working perfectly