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.
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)
Date | Premier Dowgrade | Essencial Downgrade | Payment Processing Downgrade | Essencial Upgrade | Payment 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
Solved! Go to Solution.
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])
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.
This is very helpful. Thanks a lot
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])
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
97 | |
84 | |
67 | |
60 |
User | Count |
---|---|
150 | |
120 | |
99 | |
87 | |
68 |