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 September 15. Request your voucher.
I am trying to form the DAX Expression for Pie Chart. But, the count is not coming properly.
below is my table.
Below is the expression.
Solved! Go to Solution.
Try :
Total_A = CALCULATE(COUNT('TEST DATA'[RECID]),FILTER('TEST DATA',(NOT ('TEST DATA'[COUNTRY-A] IN {"NOT APPLICABLE"} )
&& NOT ('TEST DATA'[COUNTRY-B] IN {"NOT APPLICABLE"} )
&& NOT ('TEST DATA'[COUNTRY-C] IN {"NOT APPLICABLE"} )
) && 'TEST DATA'[CODE] <> Blank()))
Hi,
I really don't understand the answers pointing to the blank function, my PowerBI doesn't recognize this crappy function and null (all lowercase!) works very well.....
You can simply compare the column with null....
Example : if [column A]<>null then .... else ....
Respect the case! because with If, IF, Null, NULL : it doesn't work!
Doffy
Try :
Total_A = CALCULATE(COUNT('TEST DATA'[RECID]),FILTER('TEST DATA',(NOT ('TEST DATA'[COUNTRY-A] IN {"NOT APPLICABLE"} )
&& NOT ('TEST DATA'[COUNTRY-B] IN {"NOT APPLICABLE"} )
&& NOT ('TEST DATA'[COUNTRY-C] IN {"NOT APPLICABLE"} )
) && 'TEST DATA'[CODE] <> Blank()))
what would be the condition if only blank instead of <> Blank()
&& 'TEST DATA'[CODE] <> Blank()
&& ISBLANK 'TEST DATA'[CODE]
Total_A = CALCULATE(COUNT('TEST DATA'[RECID]),FILTER('TEST DATA',(NOT ('TEST DATA'[COUNTRY-A] IN {"NOT APPLICABLE"} )
&& NOT ('TEST DATA'[COUNTRY-B] IN {"NOT APPLICABLE"} )
&& NOT ('TEST DATA'[COUNTRY-C] IN {"NOT APPLICABLE"} )
) && ISBLANK('TEST DATA'[CODE])))
Will the above work...?
User | Count |
---|---|
70 | |
64 | |
62 | |
49 | |
28 |
User | Count |
---|---|
117 | |
75 | |
61 | |
54 | |
42 |