2 min readfrom 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 on ProductID. 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

File Link

submitted by /u/Bassiette03
[link] [comments]

Want to read more?

Check out the full article on the original site

View original article

Tagged with

#Excel alternatives for data analysis
#big data management in spreadsheets
#no-code spreadsheet solutions
#generative AI for data analysis
#conversational data analysis
#real-time data collaboration
#intelligent data visualization
#Excel compatibility
#rows.com
#google sheets
#cloud-based spreadsheet applications
#financial modeling with spreadsheets
#natural language processing for spreadsheets
#AI-native spreadsheets
#financial modeling
#predictive analytics in spreadsheets
#DAX
#Data Modeling
#Power Pivot
#Total Sales