Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now
Hi
I currently have a table with the following fields
| Source | Do you use it? | Gender | Age | Income |
| Internet | YES | M | 18-25 | 1000-2000 |
| Internet | NO | F | 26-35 | 2001-3000 |
| TV | YES | M | 36-45 | 1000-2000 |
| Magazine | NO | F | 18-25 | 5001-6000 |
And I created the following measure:
Medida = DIVIDE(COUNTA(M_Medios[Do you use it?]),1052)
The 1,052 is because there are 1,052 answers for each source (internet, TV, Magazine)
What I'm trying to do is to obtain the percentage of each source that had answered YES in a bar chart.
But when I try to use Slicers the data keeps dividing for 1,052 instead of the new total for each source.
For example, If I use a slicer for Males, the Internet should be 100% YES, wherein on the other hand if it is female it will be 0%. But currently, it is showing 50% for Male slicers.
Solved! Go to Solution.
Hi, @siac16
A measure could be like this:
Measure =
var _DIVIDE=
DIVIDE(
CALCULATE(COUNT('Table'[Do you use it?]),FILTER(ALLSELECTED('Table'),'Table'[Do you use it?]="YES")),
CALCULATE(COUNTROWS('Table'),ALLSELECTED('Table'))
)
VAR _IF=IF(_DIVIDE=BLANK(),0,_DIVIDE)
RETURN _IF
Result:
Please refer to the attachment below for details.
Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @siac16
A measure could be like this:
Measure =
var _DIVIDE=
DIVIDE(
CALCULATE(COUNT('Table'[Do you use it?]),FILTER(ALLSELECTED('Table'),'Table'[Do you use it?]="YES")),
CALCULATE(COUNTROWS('Table'),ALLSELECTED('Table'))
)
VAR _IF=IF(_DIVIDE=BLANK(),0,_DIVIDE)
RETURN _IF
Result:
Please refer to the attachment below for details.
Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the April 2026 Power BI update to learn about new features.
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.
| User | Count |
|---|---|
| 45 | |
| 38 | |
| 34 | |
| 21 | |
| 17 |
| User | Count |
|---|---|
| 66 | |
| 65 | |
| 31 | |
| 26 | |
| 26 |