Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Fusilier2
Helper V
Helper V

Comparing numeric values with count rows value

Hi,

Don't know if this is possible but hope somebody can help/advise.

 

I have data composed of answers to responses from a local survey. The data consists of one answer per respondent per question (Agree, disagree etc.) So my visuals are set up to count rows. All fine.

However I have a second set of National data where the data consists of the total number of responses for the questions (e.g. 5,400 said Agree).

Is there any way of using both sets of data in a PBI report so that both sets of data can appear on the same visual - say as % of total?

Can't think of a way to do this (or if it is even possible) so may have to have each type of data in a different visual.

 

5 REPLIES 5
Fusilier
Helper III
Helper III

I think I was over thinking things.

If I both types of data, but one as sum and the other as count I can use both on the same chart.

Ritaf1983
Super User
Super User

Hi @Fusilier2 

Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Hi,

Here is some dummy data.

Two tables.

 

Table one is individual responses for the local area, which I would use 'countrows' to total in any measures:

YearQuestionAnswerQuestion matched
01/01/23Q4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
Please consider your local area to be the area within 15-20 minutes walking distance from your home.
Fairly dissatisfiedQ4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
01/01/23Q4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
Please consider your local area to be the area within 15-20 minutes walking distance from your home.
Fairly satisfiedQ4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
01/01/23Q4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
Please consider your local area to be the area within 15-20 minutes walking distance from your home.
Very satisfiedQ4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
01/01/23Q4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
Please consider your local area to be the area within 15-20 minutes walking distance from your home.
Very dissatisfiedQ4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
01/01/23Q4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
Please consider your local area to be the area within 15-20 minutes walking distance from your home.
Fairly satisfiedQ4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
01/01/23Q4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
Please consider your local area to be the area within 15-20 minutes walking distance from your home.
Fairly satisfiedQ4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
01/01/23Q4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
Please consider your local area to be the area within 15-20 minutes walking distance from your home.
Fairly satisfiedQ4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
01/01/23Q4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
Please consider your local area to be the area within 15-20 minutes walking distance from your home.
Fairly satisfiedQ4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
01/01/23Q4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
Please consider your local area to be the area within 15-20 minutes walking distance from your home.
Fairly satisfiedQ4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
01/01/23Q4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
Please consider your local area to be the area within 15-20 minutes walking distance from your home.
Neither satisfied nor dissatisfiedQ4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
01/01/23Q4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
Please consider your local area to be the area within 15-20 minutes walking distance from your home.
Very satisfiedQ4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
01/01/23Q4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
Please consider your local area to be the area within 15-20 minutes walking distance from your home.
Very dissatisfiedQ4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
01/01/23Q4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
Please consider your local area to be the area within 15-20 minutes walking distance from your home.
Fairly satisfiedQ4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
01/01/23Q4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
Please consider your local area to be the area within 15-20 minutes walking distance from your home.
Fairly dissatisfiedQ4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
01/01/23Q4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
Please consider your local area to be the area within 15-20 minutes walking distance from your home.
Fairly dissatisfiedQ4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?

Table two is the national data which is a total of all responses as opposed to individual responses:

YearQuestionAnswerTotal answerQuestion matched
01/01/23Question 1. Overall, how satisfied or dissatisfied are you with your local area as a place to live?Fairly satisfied25Q4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
01/01/23Question 1. Overall, how satisfied or dissatisfied are you with your local area as a place to live?Very satisfied25Q4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
01/01/23Question 1. Overall, how satisfied or dissatisfied are you with your local area as a place to live?Neither satisfied nor dissatisfied52Q4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
01/01/23Question 1. Overall, how satisfied or dissatisfied are you with your local area as a place to live?Fairly dissatisfied60Q4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?
01/01/23Question 1. Overall, how satisfied or dissatisfied are you with your local area as a place to live?Very dissatisfied45

Q4. Overall on behalf of your household, how satisfied or dissatisfied are you with your local area as a place to live?

 

'Question matched' is the same in both tables.

I would like to be able to chart each in the same visual as a total or % of total (e.g. a line for 'Very satisfied' for 'Local area' and a line for 'Very satisfied' 'Total national',  but obviously the granularity is different in both tables.

If you need any more explanation, please let me know.

Anonymous
Not applicable

Hi @Fusilier2 ,

Thanks for your providing sample data. Base on your description, it seems like you want to display the count and %of total on the same visual? Could you please provide the calculation logic of %of total and your visual settings base on your shared sample data?

 

In addition, you can review the following links about getting the percent of total...

How to Calculate Percent of Total in Power BI (With Example) 

Percentage of Total in Power BI: A Visual Guide 

vyiruanmsft_1-1724228627587.png

Solved: Calculating percentage from two different tables i... - Microsoft Fabric Community

Best Regards

Hi @Fusilier 
Why not merge them by year, and answer and match question?

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.