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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
carolinefer
Helper I
Helper I

Count of products downgrade and upgrade as well as amount upgradeded and downgraded.

Hello All, 

 

I hope you can help me. 

I need to provide the number of packages that have been downgraded and upgraded and the difference in price.

Difference in price= current value of the package - previous value of the package

Downgrade : any client that remove the package or price decrease (we cannot count for accounts that removed all packages, only those that remove at least one of the packages)

Upgrade : any client that add the package or price increase(we cannot count for new accounts that just started this month and add all packages in the current month)

 

I need a Table with the dates and quantity of products downgraded/upgraded (not counting new customers or churn customers)

DatePremier DowgradeEssencial DowngradePayment Processing DowngradeEssencial UpgradePayment Processing upgrade
Oct 2021$1500$1200$100$150$200
Nov 2021 $100 $150$1200$100$150

or

October 2021

Premier Downgrade $1500
Essential Downgrade$1200
Payment Processing Downgrade$100
  
November 2021 
  
Payment Processing Donwgrade$1200
Essential Upgrade $100
  

 

Here is the excel document: 

https://1drv.ms/u/s!AhV79iO4Q4pCgqgm8ekeyIisO3WPCQ?e=L8DESq

 

Thanks in advance

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

Hi @carolinefer ,

Please have a try.

Create two tables.

date_0910 = FILTER(ALL(Sheet1),Sheet1[date]<MAX(Sheet1[date]))
dat_11 = FILTER(ALL(Sheet1),Sheet1[date]=MAX(Sheet1[date]))

Then create measures.

Difference in price = var current_valur=CALCULATE(SUM(Sheet1[amount]),FILTER(ALL(Sheet1),Sheet1[date]=SELECTEDVALUE(Sheet1[date])&&Sheet1[package]=SELECTEDVALUE(Sheet1[package])))
var previous_value= CALCULATE(SUM(Sheet1[amount]),FILTER(ALL(Sheet1),Sheet1[date]=SELECTEDVALUE(Sheet1[date])-1&&Sheet1[package]=SELECTEDVALUE(Sheet1[package])))
var difference=current_valur-previous_value
return difference
Measure = 
var if_ = IF(SELECTEDVALUE(date_0910[package]) in VALUES('dat_11'[package])||Sheet1[times]=3,"Upgrade","Downgrade")
return if_
times = COUNTX(FILTER(ALL(Sheet1),Sheet1[customer_id]=SELECTEDVALUE(Sheet1[customer_id])&&Sheet1[package]=SELECTEDVALUE(Sheet1[package])),Sheet1[package])

11.PNG

Best Regards

Community Support Team _ Polly

 

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
carolinefer
Helper I
Helper I

This is very helpful. Thanks a lot

v-rongtiep-msft
Community Support
Community Support

Hi @carolinefer ,

Please have a try.

Create two tables.

date_0910 = FILTER(ALL(Sheet1),Sheet1[date]<MAX(Sheet1[date]))
dat_11 = FILTER(ALL(Sheet1),Sheet1[date]=MAX(Sheet1[date]))

Then create measures.

Difference in price = var current_valur=CALCULATE(SUM(Sheet1[amount]),FILTER(ALL(Sheet1),Sheet1[date]=SELECTEDVALUE(Sheet1[date])&&Sheet1[package]=SELECTEDVALUE(Sheet1[package])))
var previous_value= CALCULATE(SUM(Sheet1[amount]),FILTER(ALL(Sheet1),Sheet1[date]=SELECTEDVALUE(Sheet1[date])-1&&Sheet1[package]=SELECTEDVALUE(Sheet1[package])))
var difference=current_valur-previous_value
return difference
Measure = 
var if_ = IF(SELECTEDVALUE(date_0910[package]) in VALUES('dat_11'[package])||Sheet1[times]=3,"Upgrade","Downgrade")
return if_
times = COUNTX(FILTER(ALL(Sheet1),Sheet1[customer_id]=SELECTEDVALUE(Sheet1[customer_id])&&Sheet1[package]=SELECTEDVALUE(Sheet1[package])),Sheet1[package])

11.PNG

Best Regards

Community Support Team _ Polly

 

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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