Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
I am trying to create a calculated column based on filter selected
This is my base table:
| year | month | value | location |
| 2020 | (01) JAN | 2 | A |
| 2020 | (02) FEB | 1 | B |
| 2020 | (03) MAR | 5 | C |
| 2020 | (04) APR | 5 | A |
| 2020 | (05) MAY | 3 | A |
| 2020 | (06) JUN | 5 | C |
| 2020 | (07) JUL | 3 | B |
I would like to create a matrix that likes this: create a calculated column "newest location" always show the location of the max month selected. i need this as a column not a measure buecasue i need to put this in a Matrix as 'Rows"
When month 1 & 2 is selected:
| newest location | (01) JAN | (02) FEB | |
| value | B | 2 | 1 |
When month 1 & 2 &3 is selected:
| newest location | (01) JAN | (02) FEB | (03) MAR | |
| value | C | 2 | 1 | 5 |
Solved! Go to Solution.
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
@Anonymous , You can not create a calculated column based on the slicer. The column is calculated and stored as physical data and static in nature.
You have think about that calculation like Measure
https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/
You can measure like SUMX , COuntX etc , Here you can have column calculation
example
new column = [Price]* [Qty]
Sales measure = Sum([new column]
You can have measure like
New Sales - Sumx(Table, [Price]* [Qty] )
Copying DAX from this post? Click here for a hack to quickly replace it with your own table names
Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C
I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 77 | |
| 37 | |
| 31 | |
| 29 | |
| 26 |