Forum Discussion

vijethshetty22's avatar
vijethshetty22
Frequent Visitor
9 years ago
Solved

Unable to display trend arrows in table visual.

Hello, I am looking for options to display trend image (Up or Low Arrows) for my sales values w.r.t MOM (month on month) changes. I had gone through http://community.powerbi.com/t5/Desktop/up-arrow...
  • Anonymous's avatar
    Anonymous
    9 years ago

    Hi vijethshetty22,

     

    Since measure no support to modify the data category, if you want to show the image, you have to use calculate column.

     

    According to my research, your measure contians some dax formula which based on the filter effect of visual. Calculate column is an pretreatment column, if you directly use above formulas in calculate column, it will caused the issue.

     

     

    To work through this issue, you can take a look at below calculated column formulas:

     

    Total Sales 2 = SUMX(FILTER(ALL(Sales),[Date]=EARLIER(Sales[Date])),Sales[Sales])
    
    Previous Month Sales 2 = SUMX(FILTER(ALL(Sales),[Date].[MonthNo]=EARLIER(Sales[Date].[MonthNo])-1),Sales[Sales])
    
    % Change Sales 2 = DIVIDE([Total Sales 2],[Previous Month Sales 2],BLANK())-1
    
    Sales Key 2 = 
    IF([% Change Sales 2]>0,"https://thumb.ibb.co/ns9zQa/Up_Arrow.png", "https://thumb.ibb.co/ePvTJv/down_arrow.png")

     

     

    Regards,

    Xiaoxin Sheng