Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I am new to Power Bi and need help in creating measure to include status column which includes Decrease if Revenue 2020 > Revenue 2021 else Increase for each combination of customer and product.
I have below table
Requires below output
Irrespective of date and location, sum the value of Revenue 2021 and Revenue 2020 and then create a column to include Decrease or Increase based on these values.
Any help or guidance will be appreciated.
Solved! Go to Solution.
Hi @apatwal ,
You can create a measure with below code:-
Status =
IF (
SUM ( 'Table (3)'[revenue 2021] ) < SUM ( 'Table (3)'[revenue 2020] ),
"Decrease",
"Increase"
)
Output:-
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Please Try This Measure
Status =
VAR _R2020 = SELECTEDVALUE('Table'[Revenue 2020])
VAR _R2021 = SELECTEDVALUE('Table'[Revenue 2021])
VAR RESULT = SWITCH(TRUE(),_R2020>_R2021,"Decrease","Increase")
return RESULT
Hi @apatwal ,
You can create a measure with below code:-
Status =
IF (
SUM ( 'Table (3)'[revenue 2021] ) < SUM ( 'Table (3)'[revenue 2020] ),
"Decrease",
"Increase"
)
Output:-
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
User | Count |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
13 | |
11 | |
9 | |
6 |