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.
Hi Forum,
I only want the positive trending products. See screenshot for more information.
Thanks,
Kick, is their another solotion? I don't have a continuous data table.
@Wout define positive trending >0?
Proud to be a Super User!
@Wout ah ok! there is the waterfall chart but it will show both
you could also create a measure i guess that looks at the previous months figure and only returns a value if its greater?
ie.
positive trending =
var lastmonth = calculate(sum(sales), previousmonth(date[date))
var thismonth = TOTALMTD( sum([Sales]), 'date[date])
Return
calculate(thismonth, thismonth > lastmonth)
i haven't tested it but you get the idea
Proud to be a Super User!
Thanks for your reply @vanessafvg,
I get the following message: The True/False expression does not specify a column. Each True/False expressions used as a table filter expression must refer to exactly one column.
@Wout sorry i have been quite busy
i did the return statement incorrectly, however i am not sure how well its working
positive trending =
var lastmonth = calculate(sumx(Statements,Statements[Paid in]), previousmonth('date'[Date]))
var thismonth = TOTALMTD( sumx(Statements,Statements[Paid in]), 'date'[Date])
Return
if (lastmonth < thismonth, TOTALMTD(sum(Statements[Paid in]), 'date'[Date]), 0)
Proud to be a Super User!
@vanessafvg thanks for your time and reaction.
I cant refer to the correct column with the SUMX function.
So i tried:
positive trending = var lastmonth = calculate(sum([Price]); PREVIOUSMONTH('Tablename1'[SalesDate])) var thismonth = TOTALMTD(sum([Price]); 'Tablename1'[SalesDate]) Return IF (lastmonth < thismonth; TOTALMTD(SUM('Tablename1'[Price]);'Tablename1'[SalesDate];0))
But still get an error: The True/False expression does not specify a column. Each True/False expressions used as a table filter expression must refer to exactly one column.
i think you have your last bracket in the wrong place?
positive trending = var lastmonth = calculate(sum([Price]); PREVIOUSMONTH('Tablename1'[SalesDate])) var thismonth = TOTALMTD(sum([Price]); 'Tablename1'[SalesDate]) Return IF (lastmonth < thismonth; TOTALMTD(SUM('Tablename1'[Price]);'Tablename1'[SalesDate]);0)
Proud to be a Super User!
@Wout not sure if that made a difference for you but it worked my side?
Proud to be a Super User!
Thanks @vanessafvg, the formule is correct now.
But i get the exact same result.
Some more infromation about the chart:
@Wout it definitely works for me, what date table are you using?
positive trending =
var lastmonth = calculate(sum([Paid out]), PREVIOUSMONTH(Statements[Paid out]))
var thismonth = TOTALMTD(sum([Paid out]), 'Date'[Date])
Return
IF (lastmonth < thismonth, TOTALMTD(sum([Paid out]), 'Date'[Date],0))
see in my script above i use a date table that i have linked it to, you need a continuous date table for date functions
Proud to be a Super User!
@Wout can you show me what the graph looks like?
so can you plot the new measure plus the old measure which looks at everything
Proud to be a Super User!
@Wout very odd, i will have to try and reproduce the issue, will have to be later though!
Proud to be a Super User!
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 |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
105 | |
103 | |
81 | |
72 |