Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have column po# where I need to check count of this column such that how many times it has been occurred
Solved! Go to Solution.
Hi @bzeeblitz ,
To calculate how many times each value in the po# column has occurred, you can use either a measure or a calculated column in Power BI, depending on your requirements.
If you need the count to update dynamically based on filters in your report, you can create a measure. The measure can be written as follows:
Po# Count = COUNTROWS(FILTER('poitem', 'poitem'[po#] = SELECTEDVALUE('poitem'[po#])))
This measure counts the number of rows where the po# value matches the selected value in the report, making it responsive to slicers and filters.
Alternatively, if you need a static count that calculates the number of occurrences for each po# in the table without being influenced by filters, you can create a calculated column. The formula for this column is:
Po# Count =
CALCULATE(
COUNT('poitem'[po#]),
ALLEXCEPT('poitem', 'poitem'[po#])
)
This calculated column computes the total count of each po# while grouping by the po# column and ignoring other filters in the table. Depending on whether you need a dynamic or static result, you can choose the appropriate approach.
Best regards,
Measure:
PO Count Measure = COUNTX(FILTER('Table', 'Table'[po#] = MAX('Table'[po#])), 'Table'[po#])
Measure:
PO Count Measure = COUNTX(FILTER('Table', 'Table'[po#] = MAX('Table'[po#])), 'Table'[po#])
Hi @bzeeblitz ,
To calculate how many times each value in the po# column has occurred, you can use either a measure or a calculated column in Power BI, depending on your requirements.
If you need the count to update dynamically based on filters in your report, you can create a measure. The measure can be written as follows:
Po# Count = COUNTROWS(FILTER('poitem', 'poitem'[po#] = SELECTEDVALUE('poitem'[po#])))
This measure counts the number of rows where the po# value matches the selected value in the report, making it responsive to slicers and filters.
Alternatively, if you need a static count that calculates the number of occurrences for each po# in the table without being influenced by filters, you can create a calculated column. The formula for this column is:
Po# Count =
CALCULATE(
COUNT('poitem'[po#]),
ALLEXCEPT('poitem', 'poitem'[po#])
)
This calculated column computes the total count of each po# while grouping by the po# column and ignoring other filters in the table. Depending on whether you need a dynamic or static result, you can choose the appropriate approach.
Best regards,
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.