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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
ExcelMonke
Super User
Super User

Show All Categories on X Axis

Hello, 
I am currently building two bar charts and I need some help with X-Axis formatting. 

The problem:

In Chart 1) I am looking at a sub-group's performance, their "time buckets" only go up to 60 minutes.

In Chart 2) I am looking at the parent group performance, their "time buckets" go up to 240 minutes.

 

The desired solution: 
I want the X axis for both charts to be the same, to go up to 240 minutes. This means that Chart 1) will show the time bucket on the x axis, even if the value is 0.

 

Example Data:

 

VisitGroupSub-GroupTime Bucket
1AAb10
2AAb10
3AAb20
4AAb30
5AAb60
6AAc10
7AAc15
8AAc20
9AAc20
10AAc20
11AAc60
12AAc60
13AAc240
14AAc240

 

Desired Result:

Notice how the X-Axis in Chart 1 - which charts sub-group Ab - still show buckets 15 and 240, even if the value is 0

ExcelMonke_1-1707176042635.png

 

ExcelMonke_0-1707175789432.png

Thank you!





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





7 REPLIES 7
Anonymous
Not applicable

Hi @ExcelMonke ,

Please follow these steps:

According to your description, I created the following metric for the subgroup "Ab", and by the last judgment, the count result of 0 can also be displayed in the chart.

 

Measure =

VAR _count = CALCULATE(COUNT('Table'[Time Bucket]),FILTER(ALL('Table'),'Table'[Sub-Group] = "Ab" && 'Table'[Time Bucket] = MAX('Table'[Time Bucket])))

RETURN

IF(_count = 0,0,_count)

 

The final result is shown below.

vkaiyuemsft_0-1707193594737.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for the reply! So i tried to simplify the dataset in the problem. In actuality, the "Group" column comes from a different table (LocationDimension), and is linked to the visit table through the SubGroup name. How would I update the measure accordingly? Also it seems like I can't put the measure in the Axis.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Daniel29195
Super User
Super User

@ExcelMonke 

 

im not sure. 

maybe you enable the show items with no data. 

 

if not, maybe sharing the file if possible so i can take a closer look . 

 

 

best regards,

Thanks, that is how I got it to work on Excel, but I have not been able to find a similar button/option on Power BI. Any help finding it is also appreciated 🙂 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





@ExcelMonke 

 

you just need to right click on the column name. ( or click on the arrow down ) 

Daniel29195_0-1707177183971.png

 

 

hope this helps . 

Hmmm, unfortunately that was not *quite* what I needed. It does show additional categories, however not at the level of the main group. For example, bucket 240 is still missing. 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





@ExcelMonke 

if your calculations are returning 0 ,  then power bi will show the bucket. 

in order to know show the buckets where  that are equal to zero ,

 

you need in your dax change zero to blank () .

 

exa : 

measure= 

switch( true () , sum(tbl_name[col_name])= 0 , blank() , sum(tbl_name[col_name])

 

let me know if this helps .

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

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.