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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
F_Reh
Helper IV
Helper IV

Categorical X-Axis in SPC Chart (graph) ?

Good afternoon,

 

I have built an SPC chart as follows (the X-Axis is by Weeks):

 

F_Reh_1-1745337485745.png

 

It is pertaining to an Outcome which has extremely low value so it won't exactly be littered by troughs and peaks. But is it possible to convert the X-Axis can be categorical so those weeks where it is '0', will indeed display as '0' ?

 

Regards

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@F_Reh , When a value is blank (not zero) and the X‑axis is set to Categorical, Power BI hides that category.
The fix is to add + 0 to your measure—this converts blanks to zero, but all weeks are displayed. To overcome we need force the range filter again

 

example

0 between range
Measure = var _1= SUM(Opportunity[Opportunity count]) +0
var _min = minx(ALLSELECTED('Calendar'), 'Calendar'[Date])
var _max = maxx(ALLSELECTED('Calendar'), 'Calendar'[Date])
return
if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), _1)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

5 REPLIES 5
v-mdharahman
Community Support
Community Support

Hi @F_Reh,

Thanks for reaching out to the Microsoft fabric community forum.

It looks like you are facing issues with SPC chart. As @amitchandak already responded to your query, please go through his response and check if it solves your issue.

 

I would also take a moment to thank @amitchandak, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.

 

If I misunderstand your needs or you still have problems on it, please feel free to let us know.  

Best Regards,
Hammad.
Community Support Team

 

If this post helps then please mark it as a solution, so that other members find it more quickly.

Thank you.

Hi @F_Reh,

As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.

If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.


If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you for your patience and look forward to hearing from you.

Hi @F_Reh,

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution so that other community members can find it easily.


Thank you.

Hi @F_Reh,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

 

Thank you.

amitchandak
Super User
Super User

@F_Reh , When a value is blank (not zero) and the X‑axis is set to Categorical, Power BI hides that category.
The fix is to add + 0 to your measure—this converts blanks to zero, but all weeks are displayed. To overcome we need force the range filter again

 

example

0 between range
Measure = var _1= SUM(Opportunity[Opportunity count]) +0
var _min = minx(ALLSELECTED('Calendar'), 'Calendar'[Date])
var _max = maxx(ALLSELECTED('Calendar'), 'Calendar'[Date])
return
if(max('Calendar'[Date]) <_min || max('Calendar'[Date]) >_max , BLANK(), _1)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors