This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
My table shows each file's name and type like so, and there are no duplicates:
_____________________________
FileName | FileType
------------------------------
cloudimage jpg
annualreport pdf
monthlyreport pdf
catvideo mp4
geodata json
My report has two visuals:
1) Horizontal bar chart showing how many files of each type are in the table.
2) Card showing a percentage.
EXPECTED RESULTS
When all the bars are selected, the card should show 100%
When I select the bar for PDF, the card should show 40%
When I select all bars except jpg, the card should show 80%
I successfully created this measure to count the occurence of each filetype (which are text data)
I have unsuccessfully tried creating a second measure to use for the card visual, such as:
I tried everything I could think of: DIVIDE, CALCULATE, ALL, REMOVEFILTERS, EXCEPTALL, COUNTROWS but I can't find how to ignore the page filtering and display the correct percentage in the card. I only get:
1) 100% all the time - because 2 pdf files / 2 pdf files = 1
2) Error message about 'paramater is not the correct type', expecting a number, expecting a string, or 'cannot be found or may not be used.'
How can I get this card to show the correct percentage?
Solved! Go to Solution.
Hi @Anonymous
Would a measure like this help?
Pct =
DIVIDE(
COUNT( 'Table'[FileName] ),
CALCULATE(
COUNT( 'Table'[FileName] ),
ALL( 'Table' )
)
)
Let me know if you have any questions.
@gmsamborn You beat me to the answer by a minute 🙂 Thank you!
It also works with REMOVEFILTERS instead of ALL.
Hi @Anonymous
Would a measure like this help?
Pct =
DIVIDE(
COUNT( 'Table'[FileName] ),
CALCULATE(
COUNT( 'Table'[FileName] ),
ALL( 'Table' )
)
)
Let me know if you have any questions.
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 30 | |
| 24 | |
| 23 | |
| 17 | |
| 15 |
| User | Count |
|---|---|
| 63 | |
| 36 | |
| 30 | |
| 22 | |
| 22 |