Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
@Anonymous , 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 |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
12 | |
11 | |
8 | |
6 |