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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
rsderby68
Resolver I
Resolver I

Need Some DAX Help Turning Donut Chart Data into Stacked Area Chart Over Dates Data. HELP?

Hello Power BI Team,

 

I need to develop a visualization for which I am having trouble getting my mind around the best way to do the math.

 

I host a Vimeo OTT site, and I have a table of all our customer_id’s which includes three columns showing how many days ago (from today) they last signed in, and a second column that shows 0-30 days, 30-60 days, etc.. Up into INACTIVE which means we have no sign-in data for that customer.  Then there is a third column where I categorize the customer_id as either “ACTIVE” or “INACTIVE”.  Note the data for these are pulled from a merged table with platform login information (ie—what date they last signed-in).

 

rsderby68_0-1673747352370.png

 

 

 

I use this for a donut chart showing what % of total registrants are INACTIVE vs ACTIVE.  NOTE:  don’t ask why we have so many INACTIVE—it is a long story.

 

rsderby68_1-1673747352372.png

 

 

What I want to do is make this into a stacked area chart over dates (I have a date table) showing each day’s % of ACTIVE vs %INACTIVE users so that we can show over time how the % is changing.  The area chart should add up to 100% and continue to adapt as we add more registrants and track their sign-in information. 

 

I can’t figure out how to do this.  I am guessing I need yet another table showing each date, with calculated columns for %ACTIVE and %INACTIVE but no idea the DAX or M involved. 

 

Any suggestions?

 

Thanks,

2 REPLIES 2
rsderby68
Resolver I
Resolver I

I 'sort of' figured it out using my running total and an inactive/active legend but I still don't know how to turn it into %.  I'd prefer to use % of total rather than just raw numbers.  Any ideas? 

 

rsderby68_0-1673749012822.png

 

Hello @rsderby68,

Maybe if you try the following measure:

% Active/Inactive =
var _category = COUNT('Table'[Vimeo_Customer_id])
var _all = CALCULATE(COUNT('Table'[Vimeo_Customer_id]), ALL('Table'[Vimeo_Customer_Sign_In_Slicer]))
return DIVIDE(_category, _all)
 
and use [Vimeo_Customer_Sign_In_Slicer] column as a legend for the visual.
 
Hope I helped,
Maria

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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