Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Wout
Helper I
Helper I

Only show positive trending products

Hi Forum,

 

I only want the positive trending products. See screenshot for more information.

 

Trendingproducts.png

 

 

Thanks,  

 

14 REPLIES 14
Wout
Helper I
Helper I

Kick, is their another solotion? I don't have a continuous data table. 

vanessafvg
Super User
Super User

@Wout define positive trending >0?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




@vanessafvg Positive Trending ->  When sales increase per month

@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

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

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)





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

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.

@Wout

 

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)




If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




@Wout not sure if that made a difference for you but it worked my side?

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

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:

 

Schermafbeelding 2017-06-27 om 16.36.55.png

@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





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

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





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




@vanessafvg, the charts are added below.

 

 

 

Charts.jpg

 

Do you need additional information?

@Wout very odd, i will have to try and reproduce the issue, will have to be later though!  





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.