Skip to main content
cancel
Showing results for 
Search instead 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

Reply
pranay2k2
Advocate I
Advocate I

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

Thanks for your reply. I acheived the desired result . Shared snapshot for your reference.

pranay2k2_0-1680620697087.png

 

View solution in original post

4 REPLIES 4
v-yangliu-msft
Community Support
Community Support

Hi  @pranay2k2 ,

I created some data:

vyangliumsft_0-1680574906071.png

 

Here are the steps you can follow:

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

vyangliumsft_1-1680574906075.png

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:

vyangliumsft_0-1680575027627.png

 

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

Thanks for your reply. I acheived the desired result . Shared snapshot for your reference.

pranay2k2_0-1680620697087.png

 

pranay2k2
Advocate I
Advocate I

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

pranay2k2_0-1680180655467.png

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

Idrissshatila
Super User
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

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors