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
birdietran
Frequent Visitor

Dynamic Count measure based on another column

I have a list of customers categorized into 3 categories: Existing - New - Leave. Example as below.

 

I wanna draw a stacked column chart showing fluctuation in the monthly number of customers, where the stacks representing Existing & New customers falls above the x axis while that of the Leave customers falls below it.

 

My idea is to write a Count measure which returns positive value for Existing/New & negative value for Leave, then put it into the chart. However I am still struggling to write it. 

 

Your help is much appreciated!

 

TimelineCustomerCategory
JanAExisting
JanBNew
JanCLeave
FebAExisting
FebBExisting
FebENew
3 REPLIES 3
amitchandak
Super User
Super User

@birdietran , you can have two measures like this

 

calculate(count(Table[customer]), filter(Table, table[Category] ="Leave"))*-1

calculate(count(Table[customer]), filter(Table, table[Category] <>"Leave"))

 

You can try water fall visual

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

Thank you!

 

Unfortunately I gotta stick with stacked columns. Actually I have 2 types of increase: New - New & Existing - New - which have to be displayed in 2 separate increase blocks should waterfall chart is used. But Power BI waterfall chart allows only 1 increase block between periods.

 

So I guess the above doesnt work for me :< Is there anyway I can create a stacked column chart?

birdietran
Frequent Visitor

Anyone can help please? 🙂

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors