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] )
)
)
sjoerdvn
1 year agoSolution Sage
Have you tried something like this?
m_lan= CALCULATE(
sumx(values('vAbc'[ProjectID]),calculate(DISTINCTCOUNT('vAbc'[ID])))
,'vAbc'[col1] <> "Hello"
,NOT(ISBLANK('vAbc'[col1]))
)- Trodo73771 year agoFrequent Visitor
Thank you for your suggestion. I changed measure but it shows the same value for all rows.
- BeaBF1 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!
- sjoerdvn1 year agoSolution Sage
yes. was wondering what the sumx was for. But you might have to share more on the data you have and the output you are trying to achieve here.