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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Working with What If Parameters

Hi everyone,

 

I'm pretty new to Power BI and trying to set up a what if parameter for churn. The churn definition is that if an order has not been placed in over 90 days, that account has churned. There is data for 5 years in the dataset. I created a what if parameter called 'Has_churned' with the following - 

Has_churned = GENERATESERIES(90, 365, 10) and
Has_churned Value = SELECTEDVALUE('Has_churned'[Has_churned], 90)
 
I then calculated the measure has_churned_test = 
IF(
         sum('Customer'[Days Since Last Purchase]) > Has_churned[Has_churned Value],
         "Churned",
         "Not Churned"
)
 
This works as a measure in a table which shows customer number, days since last purchase and has_churned_test.
 
But I don't know how to do anything else with it. The goal is to see a yearly breakdown graph of churn and be able to change that graph using the what if paramter. However, because churn_test is a measure, I can't add it to a graph legend. I tried creating a column for the same but the values there are always the default value of Has_churned Value and the slicer doesn't affect it at all.
 
Is there a way to count customer churn per year? Or some other way to show this data that is not a huge table/matrix?
 
Thank you so much!
2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , to me, seem like you need these value as a parameter too, in that case, you have to create an independent  table with these two values and then join them in measure

example

 

Sumx(filter(values(Customer[Customer]) , [has_churned_test] = max(churned_table[Value])), [Amount] )

 

 

Customer is grouping, Value Is measures. churned_table table has those two values as row

refer

 

Dynamic Segmentation Bucketing Binning
https://community.powerbi.com/t5/Quick-Measures-Gallery/Dynamic-Segmentation-Bucketing-Binning/m-p/1387187#M626


Dynamic Segmentation, Bucketing or Binning: 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
Anonymous
Not applicable

@amitchandakThank you so much for sharing that!

 

The thing is, I'd like the user to select the churn value, i.e., Has_churned[Has_churned Value] is the slicer that they'd be able to change and see how revenue changes.

 

If I create a separate table, in this calc from your reply, max(churned_table[Value])), [Amount] ), what is 'Amount'?

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