Conditional narrative for Top items

I’m creating an issue card in narratives but I only wanted to see the Top items that is greater than a threshold that I set. Is there a way to configure it after For statement?

e.g.
image

Expected output after setting an if statement that will filter less than 10%
image

Thanks

Hello @Mark_Anthony_Ching, this can definitely be accomplished. I could not get it to format exactly how I wanted with the bullet points, but I was able to use an Inline IF expression inside of the For expression.

Here is how it looked built out on my end. You can use the if statement to check if your value is within the range you are looking for then return the values you want. As you can see, I deleted the bullet point at the beginning of the line and replaced with a hyphen and some spaces in the return for the If statement to ensure no empty bullet points are displayed. I will mark this as the solution for now, but if this doesn’t work how you expected please let me know!

This works for me. How about multiple variables? E.g.

Top 3 Customer for total Sales and Qty. are

  • Anthem with $55K from 11 products
  • Ford Motor with $43k from 12 products

Thanks

Hello @Mark_Anthony_Ching, this is definitely where customizing the narratives can be a bit tricky. It may take some time playing around with adding different calculated fields and managing the calculations available in the insight.

Here is a link to a community question that I worked on which may give you some insight on how to get closer to your solution. I think utilizing the IF statement with the TotalAggregate inside the FOR loop is going to cause some problems though. This may be a scenario where you will want to manage the IF statement in a calculated field, import that into the Insight and then try adding Quantity as a totalAggregate. That might be the best course of action.