Forum Discussion
DAX issue
I ran into the situation while trying to automate all the manual entry values in measures. I have created table in DB as mentioned below.
Table Name :Demo
| Column | Value |
| Company | Microsoft |
| Id | SO3F2 |
| Id | SO3F5 |
| Location | Bangalore |
Measure:
Measure:= CALCULATE(CONCATENATEX(FILTER(Demo,COUNTROWS(FILTER(Demo,EARLIER(Demo[Column])=Demo[Column]))),Demo[Value],","), FILTER(Demo, Demo[Column]="Id"))
Output: SO3F2,SO3F5
When I pass this measure in some other DAX, I am getting this ID as a single value but this is expected as a separate value. So the data will filter for both ID SO3F2 & SO3F5. Please help me here to separate those value while passing in other DAX function.
Example: there is a Measure Balance where i am putting the code as is
Balance:= CALCULATE(SUM(SUMMARY[Available]),FILTER(SUMMARY,SUMMARY[CODE] IN {"SO3F2","SO3F5"}),FILTER(FACILITY,FACILITY[FLAG]="Y"))
i want to replace these two codes with one measure. In future multiple ID may get added up to DEMO table so i dont want to create 2 diffrent measure and call.
Thanks in Advance.
1 Reply
- DataInsightsSuper User
Anonymous,
Try the following:
1. Create a relationship between the Demo and Summary tables:
2. Create the measure below:
Balance = CALCULATE ( SUM ( Summary[Available] ), Demo[Column] = "Id" )