•2 min read•from Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community
[DAX/Data Modeling] filtering years and calculating Measures across tables
Hi everyone,
I'm working on a data model in Excel (Power Pivot) and I'm stuck on two specific issues. I’m relatively new to DAX and would love some guidance.
Problem 1: Filtering Years I want to restrict my data/report to show only 2020 and 2021. I need to exclude 2022 entirely from the calculation. Is it better to do this via a Filter in the Pivot Table, or should I bake this logic into a DAX measure using CALCULATE?
Problem 2: Calculating across tables I need to calculate Total Sales, but the data is split:
- Table A (Sales): Contains
Units Sold. - Table B (Products): Contains
Unit Price. There is a relationship between these tables based onProductID. How do I write a measure that pulls the price from Table B to multiply by the units in Table A? I've tried a few things, but I keep getting errors because they are in different tables.
Any help or “best practice” advice would be greatly appreciated!
All files are from Excel is fun YouTube channel
the mention sheets are R DM DAX and HW4
[link] [comments]
Want to read more?
Check out the full article on the original site
Tagged with
#google sheets
#AI-powered spreadsheet