Forum Discussion

Busno's avatar
Busno
Helper I
5 years ago
Solved

multi-condition calculate

Hi,

Base on my data I have Sales, Market share and need to calculate for Target. There are 2 conditions of Target.

 

1. If Market share=< 15%, Target = Sales + 10%

2. If Market share> 15%, Target = Sales + 15%

 

How can I create DAX for Target?

 

Thank you

 

3 Replies

  • Busno , Try like

     

    Switch( true(),
    [Market share] <.15, [Sales]*1.1,
    [Sales]*1.15
    )

  • Hey Busno ,

     

    please describe how you define Market Share.

     

    I'm also wondering how periodically data refreshes have to be considered, as growing data might impact the Sales and therefor Marketshare.

     

    Maybe you want to consider creating a pbix file that contains sample data, but still reflects your data model. Upload the pbix to onedrive or dropbox and share the link. If you are using Excel to create the sample data share the xlsx as well.

     

    Regards,

    Tom