September 30, 2015 at 11:16 am
I know this isn't an SSAS question, but it has to do with DAX and I figured this was the best place to ask it. I am new to DAX and am working on a Power BI report and need to need to create a calculation to determine a benchmark score. I am not sure if there is a built in DAX function that fit this need or not and am looking for feedback from the community. Below is an example of what I am needing to do.
I have the following columns in the database table: term and LNF
If the term = 1 and the LNF is between 0-2 the resulting value should be a 1. If the LNF is between 3-10 it should be a 2. If the LNF is 11 or above it should be a 3.
If the term = 2 and the LNF is between 0-17 the resulting value should be a 1. If the LNF is between 18-29 it should be a 2. If the LNF is 30 or higher it should be a 3.
Like I said, I'm sure there is probably a DAX function that will work for this, but I'm not even sure how to search for it. Thank you for any help you provide.
October 1, 2015 at 2:51 am
I'm pretty sure you can do what you need using IF and/or SWITCH. Lot's of stuff out there for this:
https://msdn.microsoft.com/en-us/library/gg492166.aspx
https://msdn.microsoft.com/en-us/library/ee634824.aspx
http://www.powerpivotpro.com/2012/06/dax-making-the-case-for-switch/
http://sqlmag.com/sql-server-analysis-services/ssas-tabular-part-4-deep-dive-dax
October 1, 2015 at 7:41 am
PB_BI (10/1/2015)
I'm pretty sure you can do what you need using IF and/or SWITCH. Lot's of stuff out there for this:https://msdn.microsoft.com/en-us/library/gg492166.aspx
https://msdn.microsoft.com/en-us/library/ee634824.aspx
http://www.powerpivotpro.com/2012/06/dax-making-the-case-for-switch/
http://sqlmag.com/sql-server-analysis-services/ssas-tabular-part-4-deep-dive-dax
Thank you for the links. I came across IF yesterday and have been working on creating a statement to match my needs. It's going to be one long IF statement by the time it's done, but it is working so far. Thank you again!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply