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
VendettaBob
Helper II
Helper II

Dynamic Buckets With Measure

Hi,

 

I have a measure call [Is SQ], which is basically just a count.

 

I want to be able to bucket this data into the following bandings

 

If [Is SQ] = 1 THEN "Band 1"

If [Is SQL] = 2 THEN "Band 2"

If [Is SQL] = 3 THEN "Band 3"

ELSE "Band 4 +"

 

I would this to be able to see this as the x axis on a graph. These bandings would need to change depending on the date selection.

 

Any ideas?

 

 

 

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

Hi, @VendettaBob 

According to your description, I can roughly understand your requirement, I think that’s it’s not possible to place the measure as the x-axis on a graph, because you used a measure to get the count value so that you have to use another measure to quote this measure, and measure can’t be placed as the x-axis on a graph. Therefore, I suggest you to use a card chart to display the value of the measure based on the selection of the date slicer, you can try my steps:

This is my test data:

v-robertq-msft_0-1621496631921.png

 

I create two measures like this:

Is SQ = COUNT('Table'[SQ])
Band =

SWITCH(

    TRUE(),

    [Is SQ]=1,"Band 1",

    [Is SQ]=2,"Band 2",

    [Is SQ]=3,"Band 3",

    "Band 4 +")

Then I created a slicer and a card chart to place them like this:

v-robertq-msft_1-1621496631931.png

 

And you can get what you want.

You can download my test pbix file below

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

2 REPLIES 2
v-robertq-msft
Community Support
Community Support

Hi, @VendettaBob 

According to your description, I can roughly understand your requirement, I think that’s it’s not possible to place the measure as the x-axis on a graph, because you used a measure to get the count value so that you have to use another measure to quote this measure, and measure can’t be placed as the x-axis on a graph. Therefore, I suggest you to use a card chart to display the value of the measure based on the selection of the date slicer, you can try my steps:

This is my test data:

v-robertq-msft_0-1621496631921.png

 

I create two measures like this:

Is SQ = COUNT('Table'[SQ])
Band =

SWITCH(

    TRUE(),

    [Is SQ]=1,"Band 1",

    [Is SQ]=2,"Band 2",

    [Is SQ]=3,"Band 3",

    "Band 4 +")

Then I created a slicer and a card chart to place them like this:

v-robertq-msft_1-1621496631931.png

 

And you can get what you want.

You can download my test pbix file below

 

If this result is not what you want, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

Thank you very much!

 

Best Regards,

Community Support Team _Robert Qin

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

amitchandak
Super User
Super User

@VendettaBob , You have to create a table with Values

 

Value, Brand

1, brand 1

2, brand 2

3, brand 3

 

and then use this to create measures

 

countx(filter(values(Table[ID]),[Is SQ] =max(bucket[value])),Table[ID])

 

where table[ID] is the grouping level for this measure value

 

refer this video if need https://youtu.be/CuczXPj0N-k

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
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.