Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi all.
How do you in dax create a measure (not interested in creating a calculated column) based on a text column.
I have a table containing ColumnA so whenever ColumnA is blank then for that row I would like it to be marked with 1 and else 0 - something like this:
# ColumnA NewMeasure (NOT calculated column)
1 textABC 0
2 1
3 textBCD 0
***
So that I later on can sum on this NewMeasure, and I would not only show rows where NewMeasure = 1 but all rows.
Thanks in advance
Solved! Go to Solution.
@cantona7 , check one of the two
sumx(table,if(table[ColumnA] = " ",1,0))
or
if(isblank(sum([ColumnA] )) ,1,0)
@cantona7 , check one of the two
sumx(table,if(table[ColumnA] = " ",1,0))
or
if(isblank(sum([ColumnA] )) ,1,0)
thanks a lot 🙂 this worked:
sumx(table,if(table[ColumnA] = " ",1,0)) BUT when asking if a string is blank it should be sumx(table,if(table[ColumnA] = "",1,0)) (without spaces between "" )
Thanks again
User | Count |
---|---|
41 | |
27 | |
23 | |
19 | |
16 |
User | Count |
---|---|
55 | |
35 | |
21 | |
18 | |
15 |