Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
26 | |
21 | |
16 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |