The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have created a simple table like
Col A | Col B
---------------
PBI1 | INC1
PBI1 | INC2
PBI1 | INC3
PBI2 | INC4
PBI2 | null
PBI3 | null
PBI3 | null
-----------
I want the total distinct count of ColA to be 3 and distinct count of Col B to be 4.
Col A | Col B
--------------
3 | 4
please help
Solved! Go to Solution.
MEASURE = CALCULATE ( DISTINCTCOUNT ( Table1[ Col B] ), Table1[ Col B] <> BLANK () )
Hi,
Try these measures
=DISTINCTCOUNT(Data[column1])
and
=DISTINCTCOUNT(Data[column2])
@Ashish_Mathur, this will give only the count in the Total correct but still shows numbers for the blank record in the rows. What I got from @Zubair_Muhammad is the right measure I wanted.
MEASURE = CALCULATE ( DISTINCTCOUNT ( Table1[ Col B] ), Table1[ Col B] <> BLANK () )
Thanks a lot, Zubair. This is what I wanted. With the replaced value I changed the null value to NoData and change the measure accordingly. This worked. Thank you.
count right = CALCULATE ( DISTINCTCOUNT ( Merge1[Table4.Column1] ), Merge1[Table4.Column1] <> "NoData" )
User | Count |
---|---|
78 | |
73 | |
38 | |
30 | |
28 |
User | Count |
---|---|
107 | |
100 | |
55 | |
49 | |
45 |