Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowTry your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now
HI All
I'm a relative novice to DAX and finding this a bit tricky.
I have two tables - one with transactions and another with activity codes. The tables are linked on the activity code.
I am trying to create a new column in the activity table to show the some of the transactions that match the specific code.
Solved! Go to Solution.
Hi @ATREZISE ,
You may create column or measure like DAX below. The ALLSELECTED function will take effect of the slicers or filters for measure, while it will take effect when the data be changed and refreshed for the calculated column.
Column1 = CALCULATE (SUM ( Txns[Sales Amount] ),FILTER (ALLSELECTED(Txns), Txns[activity code]= (activity[activity code] ))
Measure1 = CALCULATE (SUM ( Txns[Sales Amount] ),FILTER (ALLSELECTED(Txns), Txns[activity code] IN FILTERS (activity[activity code] )))
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @ATREZISE ,
You may create column or measure like DAX below. The ALLSELECTED function will take effect of the slicers or filters for measure, while it will take effect when the data be changed and refreshed for the calculated column.
Column1 = CALCULATE (SUM ( Txns[Sales Amount] ),FILTER (ALLSELECTED(Txns), Txns[activity code]= (activity[activity code] ))
Measure1 = CALCULATE (SUM ( Txns[Sales Amount] ),FILTER (ALLSELECTED(Txns), Txns[activity code] IN FILTERS (activity[activity code] )))
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks
That works perfectly.
Hey,
it's not possible to create a CALCULATED COLUMN that reflects the selection from a slicer. The formula of a CALCULATED COLUMN will ony be evaluated during data refresh and if the formula will be changed.
This means you have to create a measure.
And you have to be aware that the FILTER formula just has to parameters. Multiple conditions have to be combined like so:
FILTER( <expression> ; condition1 && condition2 || condition3
&& means logical AND
|| means logical OR
It's possible to use parenthesis defining the filter
Hopefully this helps
Regards,
Tom
Thanks for the quick reply
It may be easier to explain it another way?
I am trying to sum a column from the transactions table and store the result somewhere (probably better as a measure) where the activity code linked to the transaction existing in the activity code table. The transactions are already filtered by year / month.
Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.
Check out the May 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 22 | |
| 22 | |
| 21 | |
| 20 | |
| 12 |
| User | Count |
|---|---|
| 58 | |
| 55 | |
| 42 | |
| 36 | |
| 35 |