Forum Discussion
audstrich
7 years agoRegular Visitor
DAX help
Hi everyone, I would like to get one of three outputs from the expression that I am hoping someone can teach me about: trial, implant, or battery replacement. Two of these outputs are very simple...
- 7 years ago
audstrich add new column in your table using following expression
Output 2 = VAR __data = CALCULATETABLE( VALUES(Table8[Code]), ALLEXCEPT( Table8, Table8[ID Number] ) ) RETURN IF( Table8[Code] IN {"63650","63685" }, SWITCH( TRUE(), "63650" IN __data && NOT "63685" IN __data , "Trial", "63685" IN __data && NOT "63650" IN __data , "Battery Replacement", "63685" IN __data && "63650" IN __data , "Implant" ) )
audstrich
7 years agoRegular Visitor
A single value for column 'CPT Code' in table 'Master 37105' cannot be determined. This can happen when a measure formula refers to a column that contains many values without specifying an aggregation such as min, max, count, or sum to get a single result.
parry2k
7 years agoSuper User
Are you adding a measure or column?
- audstrich7 years agoRegular Visitor
Column.
- parry2k7 years agoSuper User
Hmmm, not sure why it will give an error message when it is column, can you test it on sample dataset you provided, it all worked fine for me
- audstrich7 years agoRegular Visitor
The Home Table was wrong! It works beautifully now. Thank you so much!! I really appreciate it.