I am really struggling how to properly create a measure just to create a simple measure to check row by row if a number is greater than or less 5.
I can't use "IF" because I get the error message about a single value, which I honestly don't understand.
As someone who mainly uses Power Query or calculated columns, I'm trying to figure out how to use DAX measures more. But this same error really has me stuck!
Solved! Go to Solution.
Hi, @afmcjarre
I assume you want to create a new column.
please try the below formula for creating a new column.
New column =
IF (
CALCULATE ( SUM ( revisions_max_properties[Expiration-Inception] ) ) > 5,
TRUE,
FALSE
)
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
In that case, you can add a calculated column, either in DAX or power query editor.
For DAX,
Column = if(column_name > 5, "True", "False")
Seel below article to know more about this:
Using calculated columns in Power BI Desktop - Power BI | Microsoft Docs
Thanks,
Dheeraj
In that case, you can add a calculated column, either in DAX or power query editor.
For DAX,
Column = if(column_name > 5, "True", "False")
Seel below article to know more about this:
Using calculated columns in Power BI Desktop - Power BI | Microsoft Docs
Thanks,
Dheeraj
Okay perfect - thank you! I had done this already, just thought this could also be accomplished with a measure. Glad to know I was headed in the right direction.
Hi, @afmcjarre
I assume you want to create a new column.
please try the below formula for creating a new column.
New column =
IF (
CALCULATE ( SUM ( revisions_max_properties[Expiration-Inception] ) ) > 5,
TRUE,
FALSE
)
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Hi @afmcjarre ,
Create a Measure as shown below and it will work just fine.
Regards,
Dheeraj
#Please mark as solution and give a big thumbs up if this helps.
Unfortunately SUM nor SUMX will work for this because that only gives me one result. I need a result for each row that can then be used in a final calulation.