Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. 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 |
|---|---|
| 48 | |
| 45 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 69 | |
| 64 | |
| 32 | |
| 31 | |
| 27 |