Forum Discussion
Return a value by dividing a column value from another table with specific condition
Hello everyone,
Could anyone help me to have a DAX code with this logic:
measure = distinctcount (table 1[value1]) / (if table2[value 2] ="xxx", table2[value 3])
value 1= txt (which I need the number of them)
value 2 = text
value 3 = number
my logic is dividing the number of value1 from table 1 by column value 3 from table 2 but with this condition which value 2 from table 2 is a specific name.
I don't know if I could explain it well or not but if you need more explanation, please let me know.
Many thanks
1 Reply
- Jimmy801Community Champion
Hello Anonymous
I think you are looking here fore a new column, not for a measure. In a measure you can not reference a row... You can access with FIRSTNONBLANK(YourColumn,0) to a row that is filtered in a measure context
If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too
Have fun
Jimmy