Forum Discussion
Filters based on IDs
- 2 years ago
Hi, atziovara
Thank you very much for your reply. I have re-edited my DAX expression below:
AnswerFiltered = VAR _table = SUMMARIZE ( FILTER ( 'Table', 'Table'[Question] = "Future Demand" && 'Table'[Answer] > 0.2 ), 'Table'[Company ID] ) RETURN IF ( 'Table'[Company ID] IN _table, 'Table'[Answer] )The results are as follows:
Best Regards,
hackcrr
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
hackcrr Thank you for your answer!
I am afraid that your response does not resolve my issue. As stated above, I would like my new column to include all answers of companies for which when [Question] = Future Demand, [Answer] > 0.2. Not just the answers to Future Demand where the value is > 0.2
It should look like this:
| CompanyID | Question | Answer | FilteredAnswer |
| 1 | Current Demand | 0.3 | |
| 1 | Future Demand | 0.2 | |
| 1 | Current Labor | 0.4 | |
| 1 | Future Labor | 0.5 | |
| 2 | Current Demand | 0.5 | 0.5 |
| 2 | Future Demand | 0.4 | 0.4 |
| 2 | Current Labor | 0.3 | 0.3 |
| 2 | Future Labor | 0.2 | 0.2 |
| 3 | Current Demand | 0.3 | 0.3 |
| 3 | Future Demand | 0.3 | 0.3 |
| 3 | Current Labor | 0.6 | 0.6 |
| 3 | Future Labor | 0.7 | 0.7 |
Hi, atziovara
Thank you very much for your reply. I'm a little confused as to why the
CompanyID=1 is empty for the corresponding FilteredAnswer column?
Best Regards,
hackcrr
- atziovara2 years agoHelper I
hackcrr The data for the company whose ID = 1 are empty, because I would like to perform calculations for all the other companies that fit the criteria. I want to filter out companies based on the criteria related to Future Demand and then perform calculations with the answers of the remaining companies.
- hackcrr2 years agoMemorable Member
Hi, atziovara
Thank you very much for your reply. I have re-edited my DAX expression below:
AnswerFiltered = VAR _table = SUMMARIZE ( FILTER ( 'Table', 'Table'[Question] = "Future Demand" && 'Table'[Answer] > 0.2 ), 'Table'[Company ID] ) RETURN IF ( 'Table'[Company ID] IN _table, 'Table'[Answer] )The results are as follows:
Best Regards,
hackcrr
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.