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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
bonus60
Helper I
Helper I

Custom x-axis within filter context

Hey together,

 

is there any way within DAX or Power BI to customize the x-axis in a column chart?

 

I have a column chart with categorical values on the x-axis like "A", "B", "C", "D" and DISTINCTCOUNT values on the values. There are 2 slicers on the dashboard. With the filtercontext/combination of the 2 slicers, the x-axis reduces to "A","B","C", so "D" is exluded, that is correct.

 

However I would like to show "D" also in the same column chart/report with an individual measure.

 

Is that possible to manipulate the x-axis, while keeping the two slicers?

 

Best Regards

1 ACCEPTED SOLUTION
v-yanjiang-msft
Community Support
Community Support

Hi @bonus60 ,

According to your description, I create a sample.

vkalyjmsft_0-1655435459429.png

Here's my solution. 

1.Create a new table, don't make relationship between the two tables.

vkalyjmsft_1-1655435545035.png

Category Table = VALUES('Table'[Category])

2.Create a measure.

Sales Measure =
IF (
    MAX ( 'Category Table'[Category] ) IN VALUES ( 'Table'[Category] ),
    MAXX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[Category] = MAX ( 'Category Table'[Category] )
        ),
        'Table'[Sales]
    ),
    0
)

 Put the category column from the new table in the Axis and the measure in the Values, get the result.

vkalyjmsft_2-1655435861017.png

Here, if you want the category D display other values instead of 0, you can directly modify the 0 part in the measure.

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

View solution in original post

1 REPLY 1
v-yanjiang-msft
Community Support
Community Support

Hi @bonus60 ,

According to your description, I create a sample.

vkalyjmsft_0-1655435459429.png

Here's my solution. 

1.Create a new table, don't make relationship between the two tables.

vkalyjmsft_1-1655435545035.png

Category Table = VALUES('Table'[Category])

2.Create a measure.

Sales Measure =
IF (
    MAX ( 'Category Table'[Category] ) IN VALUES ( 'Table'[Category] ),
    MAXX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[Category] = MAX ( 'Category Table'[Category] )
        ),
        'Table'[Sales]
    ),
    0
)

 Put the category column from the new table in the Axis and the measure in the Values, get the result.

vkalyjmsft_2-1655435861017.png

Here, if you want the category D display other values instead of 0, you can directly modify the 0 part in the measure.

I attach my sample below for reference.

 

Best Regards,
Community Support Team _ kalyj

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

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

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.