cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

## Display up arrow in home page if trend line is up or down if trend line is down

We've a reqirement to display  up arrow in home page if trend line chart is up or down if trend line is down . Can someone please explain me the logic behind trend line in Power BI and how we can figure out.?

1 ACCEPTED SOLUTION

4 REPLIES 4
Community Support

Hi  @pranay2k2 ,

I created some data:

Here are the steps you can follow：

1. In Power Query -- Add Column – Index Column – From 1.

2. Create calculated column.

``````Mod =
MOD('Table'[Index],2)``````
``````Group =
SUMX(
FILTER(ALL('Table'),
YEAR('Table'[Date])=YEAR(EARLIER('Table'[Date]))&&'Table'[Index]<=EARLIER('Table'[Index]))
,[Mod])``````
``````IF =
var _current=
SUMX(
FILTER(ALL('Table'),
YEAR('Table'[Date])=YEAR(EARLIER('Table'[Date]))&& 'Table'[Group]=EARLIER('Table'[Group])),[Value])
var _last=
SUMX(
FILTER(ALL('Table'),
YEAR('Table'[Date])=YEAR(EARLIER('Table'[Date]))&&'Table'[Group]=EARLIER('Table'[Group])+1),[Value])
return
IF(
_last=BLANK(),1,
IF(
_current<_last,1,0))``````

3. Create measure.

``````Measure =
var _select=
SELECTCOLUMNS(
FILTER(ALL('Table'),
YEAR('Table'[Date])=YEAR(MAX('Table'[Date]))),
"1",[IF])
return
IF(
0 in _select,UNICHAR(128315),UNICHAR(9650))``````

4. Result:

Best Regards,

Liu Yang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

We need to show up arrow in home page if trend line is up for last 12 month (series)

I think  here we can't compare against previous month data as trend is based on last 12 months.

Super User

Hello @pranay2k2 ,

you could add arrows using a measure in a certain condition and visual it in a card.

check this https://youtu.be/V-kFHYhiVvw

 Vote for my Community Mobile App Idea

Proud to be a Super User!