Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
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!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
86 | |
80 | |
53 | |
39 | |
39 |
User | Count |
---|---|
104 | |
85 | |
47 | |
44 | |
43 |