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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
ovonel
Post Prodigy
Post Prodigy

How to combine measures with table grouped in bins?

I have the below table:

ovonel_0-1633349796744.png

(Columns Revenue 1, 2,3 are just different groups… the revenue shall appear in only one of them…  either 1,2 or 3… and then repeated in ‘Revenue’ column).

 

 

 

I want to create a stacked bar chart… (like below)

 

Where in the Y axis, I shall have custom bins (ie 0-100, 101-200 and 201-100000). And in the x axis a stacked with a count on distinct clients.

ovonel_1-1633349827755.png

 

 

 

 

What I have so far is 3 measures (see below)  to achieve the distinct count on the clients, but I am unable to produce the bins and display it in the y axis as above, how can I achieve it??

 

CALCULATE(DISTINCTCOUNT('Fact'[Key_Customer]), FILTER('Fact','Fact'[Revenue1]>0))

CALCULATE(DISTINCTCOUNT('Fact'[Key_Customer]), FILTER('Fact','Fact'[Revenue2]>0))

CALCULATE(DISTINCTCOUNT('Fact'[Key_Customer]), FILTER('Fact','Fact'[Revenue3]>0))

 

 

1 REPLY 1
lbendlin
Super User
Super User

Hopefully your source data comes in a better format. Please provide sanitized sample data that fully covers your issue. Paste the data into a table in your post or use one of the file services. 

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors