Don't miss your chance to take exam DP-600 or DP-700 on us!
Request nowLearn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi all,
I have a list of contracts that have a country and a "active/inactive" status assigned to them. I've used a card visual to display the # of active contracts in a country. The measure is as follows:
Solved! Go to Solution.
# Active Contracts =
IF( ISBLANK(CALCULATE(Counta('Table'[Active/Inactive Contract]), FILTER(ALL('Table'[Active/Inactive Contract]), 'Table'[Active/Inactive Contract] = "Active"))),0,# Active Contracts = CALCULATE(Counta('Table'[Active/Inactive Contract]), FILTER(ALL('Table'[Active/Inactive Contract]), 'Table'[Active/Inactive Contract] = "Active")))
Proud to be a Super User!
@akemr
Add +0 at the end of your measure
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@akemr , need some data to check that. But try like
# Active Contracts = CALCULATE(Counta('Table'[Active/Inactive Contract]), FILTER(ALL('Table'[Active/Inactive Contract]), 'Table'[Active/Inactive Contract] = "Active")) +0
and then filter for 0.
or use this option
Hi all, thank you very much for your help. I marked @FarhanAhmed's reply as the solution but all of your answers are solutions, i think @Fowmy's solution is the simplest to execute. thank you all 🙂
@akemr
You are welcome!
The forum allows you to mark more than one solution as accepted solutions.
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@akemr
Add +0 at the end of your measure
________________________
Did I answer your question? Mark this post as a solution, this will help others!.
Click on the Thumbs-Up icon if you like this reply 🙂
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
# Active Contracts =
IF( ISBLANK(CALCULATE(Counta('Table'[Active/Inactive Contract]), FILTER(ALL('Table'[Active/Inactive Contract]), 'Table'[Active/Inactive Contract] = "Active"))),0,# Active Contracts = CALCULATE(Counta('Table'[Active/Inactive Contract]), FILTER(ALL('Table'[Active/Inactive Contract]), 'Table'[Active/Inactive Contract] = "Active")))
Proud to be a Super User!
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 51 | |
| 40 | |
| 37 | |
| 14 | |
| 14 |
| User | Count |
|---|---|
| 84 | |
| 70 | |
| 38 | |
| 29 | |
| 26 |