Join 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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I am trying to apply a simple MAX calculation to a YYYYMM field, and I know the MAX value in the whole table is 201804.
When I create a measure to calculate MAX, I use this formula: =MAX('MarketingSnapshot'[DateStampMonth]).
Initially it works fine, and shows 201804, but when I add in more rows that drill down, it starts to show other values, and I want this to always show the MAX based on the whole table, not matter how deep I aggregate.
Is this possible to have it MAX over the whole 'MarketingSnapshot' table, instead of being influenced by each line?
I am using a Measure not a Column, and I could see this problem occuring if I used a Column.
Thanks,
Greg
Solved! Go to Solution.
Try this:
MyMax = CALCULATE(MAX('MarketingSnapshot'[DateStampMonth]),ALL('MarketingSnapshot'))
You cannot put a measure in a filter. See this post though on creating a calculated table with what you need then using that table value to be your filter.
Or, you could create a calculated column in your table using the function @Greg_Deckler gave as the column. Or create the value in Power Query as a caclulated column there and bring it into DAX that way.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingTry this:
MyMax = CALCULATE(MAX('MarketingSnapshot'[DateStampMonth]),ALL('MarketingSnapshot'))
Thank you! This worked by itself, but do you know how I can put this in a Filter? I am getting the error saying too few arguments?
You cannot put a measure in a filter. See this post though on creating a calculated table with what you need then using that table value to be your filter.
Or, you could create a calculated column in your table using the function @Greg_Deckler gave as the column. Or create the value in Power Query as a caclulated column there and bring it into DAX that way.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingGot it, thank you!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |