Forum Discussion
filter and search
Anonymous what is measureb , then 2nd dax expression will fail if left of a string is blank and first one should work
measureB is number
- parry2k7 years agoSuper User
Anonymous understood but what is the expression? Is it from same table? Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490- Anonymous7 years agoNot applicable
I seem to be getting closer to my solution, however, the measureC column shows all values the same which is the sum of the MeasureB with ColumnA starting with 1 or 5
Question, all data is from one table
Not sure why all rows in MeasureC are repeated with the sum of MeasureB
This is my DAX
CALCULATE(
[MeasureB]
, not ISBLANK('TableName'[ColumnA]) && SEARCH(".", 'TableName'[ColumnA],,0) = 0
&& LEFT('TableName'[ColumnA], 1) = "1"
||LEFT('TableName'[ColumnA], 1)= "5"
|| LEFT('TableName'[ColumnA], 1)= "6"
|| LEFT('TableName'[ColumnA], 1) = "7"
|| LEFT('TableName'[ColumnA], 1) = "8"
|| LEFT('TableName'[ColumnA], 1) = "9"
)- parry2k7 years agoSuper User
Anonymous not going into your measure, add following
CALCULATE( [MeasureB] , KEEPFILTERS( not ISBLANK('TableName'[ColumnA]) && SEARCH(".", 'TableName'[ColumnA],,0) = 0 && LEFT('TableName'[ColumnA], 1) = "1" ||LEFT('TableName'[ColumnA], 1)= "5" || LEFT('TableName'[ColumnA], 1)= "6" || LEFT('TableName'[ColumnA], 1) = "7" || LEFT('TableName'[ColumnA], 1) = "8" || LEFT('TableName'[ColumnA], 1) = "9" ) )