Forum Discussion
Trodo7377
1 year agoFrequent Visitor
Syntax error by adding conditions
I'm using this measure in PBI desktop which works fine: m_lan= sumx(values('vAbc'[ProjectID]),calculate(DISTINCTCOUNT('vAbc'[ID]))))) But I need to add two conditions and tried to change m_lan ...
- 1 year ago
m_lan =
SUMX(
VALUES('vAbc'[ProjectID]),
CALCULATE(
DISTINCTCOUNT('vAbc'[ID]),
FILTER(
All('vAbc'[col1]),
'vAbc'[col1] <> "Hello" &&
NOT iSBLANK( 'vAbc'[col1] )
)
)
Trodo7377
1 year agoFrequent Visitor
Thank you for your suggestion. I changed measure but it shows the same value for all rows.
BeaBF
1 year agoSuper User
Trodo7377 Try this:
m_lan =
SUMX(
VALUES('vAbc'[ProjectID]),
CALCULATE(
DISTINCTCOUNT('vAbc'[ID]),
'vAbc'[col1] <> "Hello",
NOT(ISBLANK('vAbc'[col1]))
)
)
It's a little different
BBF
💡 Did I answer your question? Mark my post as a solution!
👍 Kudos are appreciated
🔥 Proud to be a Super User!