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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Ceha
Frequent Visitor

Beginner questions- Count value in two columns / Bar+Line chart

Hello All.

I have few questions from a beginner Power BI user. Im trying to make a project of my own based on a dataset which i found. 

I've encountered few problems which are probably easy-fix but im struggling to understand the concept.

1) First is counting certain value from two columns.

In my dataset i have 800 rows, each has a type1 and type2, some may have only 1 and the second will be blank, but some have two types. There are 18 types and they cant double themselves so if there is "fire" in type1 then it cant be in type 2. What i want to achieve is to create a bar chart that counts how many of each type there is. I have no problem with making a chart when it counts values only from type1 or type2 but when i want to add them its just ....dont. Well its probably because of my failed DAX. I tryed create a measure "type" which would add type1 and type2 using COUNT but couldnt manage to get it to work.

2) Bar+Line char 

Im trying to create a chart with stats for each type (that i can choose by filter) but that would also show the overall average value for each stat. So if I want to see "water" the bars show values for water type but the average red line is the same. I know how to add coloring for the columns when they are below or above line so thats not important.

2) Desired chart2) Desired chart

I have 6 statistics (hp,attack,defense...) so i created a table (that contains only these stats) and putted it on a "shared axis". This may sound dumb (and probably is) but what should i do next to get my goal? Should i create a new measure to get a line that would get the average stats? I created seperate measures for each stat that gives average value (= Average(pokemon[defense]) ) but that dont work as i want to - its just a line that goes through all the stats with 1 value. Any advices?

 

Any help will be much appreciated and thank You for Your time.

Adding pbix file with data so it will be easier to see for yourself. 

https://drive.google.com/file/d/1bXInqEOrqIUM4SAYOdB-CsSNBK9Ag4Qe/view?usp=sharing

 

1 ACCEPTED SOLUTION
aj1973
Community Champion
Community Champion

Hi @Ceha 

To begin with what Table Stats represent (Grouping of something !!!). 

In your chart you are using filed Stats(in Axis) while the field is not related to any table in the model

aj1973_0-1629550656274.png

that's why the chart is not representing anything.

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

View solution in original post

1 REPLY 1
aj1973
Community Champion
Community Champion

Hi @Ceha 

To begin with what Table Stats represent (Grouping of something !!!). 

In your chart you are using filed Stats(in Axis) while the field is not related to any table in the model

aj1973_0-1629550656274.png

that's why the chart is not representing anything.

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.

Top Solution Authors
Top Kudoed Authors