Forum Discussion

preethisaldanha's avatar
preethisaldanha
Frequent Visitor
3 years ago

Conditional formatting on a table in Power BI DASHBOARD

Is there a way I can do conditional formatting of the values in Table 1 (price Index by month),based on the value in table 2 (Target Price Index). The price index in Table 1 is a measure that I have created and The Target Price Index is a calculated column

 

 

 

4 Replies

  • Is there a way I can do conditional formatting of the values in Table 1 (price Index by month),based on the value in table 2 (Target Price Index). The price index in Table 1 is a measure that I have created and The Target Price Index is a calculated column. Details after the screenshot. Currently the conditional format it is applying is a default setting from Power BI

    Price Index is calculated based on the below formula which is based on annual sales and competitor Sales

    Price Index = DIVIDE(sum('All detail'[Annual Sales $]),sum('All detail'[Competitor Annual Sales $]),0)*100
     
    Target index is a static value based on the category (details in screenshot)

     

     

     

     

    • lbendlin's avatar
      lbendlin
      Super User

      Please provide usable sample data that fully covers your issue.
      Please show the expected outcome based on the sample data you provided.

      • preethisaldanha's avatar
        preethisaldanha
        Frequent Visitor

        The output should be like below

         

        CategoryPrice IndexTarget IndexComments
        CONFECTIONERY120110Red for above target
        Foodservice90100Green for below target

         

        Price Index is  mesure calculated as follows 

        Price Index = DIVIDE(sum('All detail'[Annual Sales $]),sum('All detail'[Competitor Annual Sales $]),0)*100

        Target Index is a calculated column

         

        This is the source table 

         

        CompetitorArticle parentCategoryRoleSquadCategoryArticleCategoryArticleNumberArticleDescriptionAnnual Sales $Competitor Annual Sales $Target Index 
        Mode13310Last MinuteImpulse SnackingFROZENTAKE HOME ICE CREAM48350CONNOISSEUR 1LT CARAMEL HONEY MAC3729639960110
        Mode13310Last MinuteImpulse SnackingFROZENTAKE HOME ICE CREAM65809CONNOISSEUR 1LT MONTANA MINT1323013693.05110
        Mode13310Last MinuteImpulse SnackingFROZENTAKE HOME ICE CREAM48350CONNOISSEUR 1LT CARAMEL HONEY MAC3729639587.04110
        Mode13310Last MinuteImpulse SnackingFROZENTAKE HOME ICE CREAM65809CONNOISSEUR 1LT MONTANA MINT1323014042.7110
        Mode71642Basket BuilderFood for LaterFOODSERVICETAKE HOME READY MEAL71642FUEL'D CHIPOTLE FRIED CHICKEN15958.0815535.2100
        Mode69848Basket BuilderFood for LaterFOODSERVICETAKE HOME READY MEAL69848YOUFOODZ SLOW-COOKED BBQ BEEF & MASH4033.254401.583100
        Mode71643Basket BuilderFood for LaterFOODSERVICETAKE HOME READY MEAL71643FUEL'D STEAK, CHIPS & GRAVY8794.1618812.559100
        Mode70150Basket BuilderFood for LaterFOODSERVICETAKE HOME READY MEAL70150YOUFOODZ CREAMY CHICKEN CARBONARA9504.110303.95100
        Mode71642Basket BuilderFood for LaterFOODSERVICETAKE HOME READY MEAL71642FUEL'D CHIPOTLE FRIED CHICKEN36940.2531839.71100
        Mode69848Basket BuilderFood for LaterFOODSERVICETAKE HOME READY MEAL69848YOUFOODZ SLOW-COOKED BBQ BEEF & MASH14902.9514018.3100
        Mode72152Basket BuilderFood for LaterFOODSERVICETAKE HOME READY MEAL72152FUEL'D CHICKEN CARBONARA47847.841241.2100
        Mode71643Basket BuilderFood for LaterFOODSERVICETAKE HOME READY MEAL71643FUEL'D STEAK, CHIPS & GRAVY16989.3414643.53100