Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. 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!
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 51 | |
| 37 | |
| 35 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 65 | |
| 39 | |
| 33 | |
| 23 |