Forum Discussion
Count if a variable is related
Hi,
How can I count how many of column: "number" that has a value in column "Test" that is related to table "Special".
I have two columns in table 1: "Number" and "Test". I want to know how many number that has the same value in "Test" and "Special".
3 Replies
- amitchandakSuper User
AnneMi , where is sepcial.
One way is to have a common table of numbers and then join with both columns and count them. With inactive join, you will use userelationship
Another one is count column like
countx(filter(Table, Table[Special] = earlier(Table[Tes]) ), Table[Special])
Earlier, I should have known Earlier: https://youtu.be/CVW6YwvHHi8
- AnneMiFrequent Visitor
Hi, Thanks for the answer. I got this results:
But I just want to know how many of "Number" that has a special value. In this case, it is 1 for 1, and 1 for 10.
- AnneMiFrequent Visitor
Thanks for the answer. If I do the first suggestion; How do I write the dax?
I tried the erarlier, but I got an error-message.
Do you know if there are other options?