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!
I have a meassure called "Increased Sales"
It needs to show the sales of the chanels that sold more than the last year
For that, I have the following meassure:
Increased Sales=
CALCULATETABLE (
ADDCOLUMNS (
VALUES ( 'DB'[Chanel] ),
"Increase",
IF (
'Measures Table'[Sales]
> CALCULATE (
'Measures Table'[Sales],
SAMEPERIODLASTYEAR ( 'Date'[Date] )
)
&& [Sales] > 0,
[Sales],
0
)
)
)
I would like some advice on how to improve it, and also how to exclude the chanels that did not grow over the last year, so that they won't be shown in the table with a 0... I need to exclude them...
Any ideas?
Thanks a lot!
Solved! Go to Solution.
@Anonymous , Try measure like
Increase =Var _1 = [sales]
var _2 = calculate([sales], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
return
Switch(True() ,
_1 >0 && [_1] >[_2], "Increase" ,
Blank())
@amitchandak thanks a lot!
The meassure above gives me a list of the the chanels that increased sales followed by the word increased, when I put it in a table visualization
I would like the table to show the chanels that have increase sales and on other column, the sales
How can I moddify the meassure to do it?
@Anonymous , Try measure like
Increase =Var _1 = [sales]
var _2 = calculate([sales], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
return
Switch(True() ,
_1 >0 && [_1] >[_2], "Increase" ,
Blank())
@amitchandak do you know why it does't work with calculation groups of time intelligence?
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 |
---|---|
115 | |
100 | |
88 | |
68 | |
61 |
User | Count |
---|---|
152 | |
120 | |
102 | |
87 | |
68 |