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 create a calculated field that calculates the difference between a partner's rank this week against their rank the previous week.
The main formula below:
Trend_Rank_Performing_Partners_Direction =
VAR minDate = MIN('Calendar'[Date].[Date])
VAR maxDate = MAX('Calendar'[Date].[Date])
VAR minRankPrev =
CALCULATE(
MAX('source_data_view'[Trend_Rank_Previous_Week]),'Calendar'[Date] = minDate )
VAR maxRank =
CALCULATE(
MAX('source_data_view'[Trend_Rank]),'Calendar'[Date] = maxDate)
RETURN maxRank - minRankPrev
However, I am getting an error that says: Column 'Trend_Rank_Previous_Week' in table 'source_data_view' cannot be found or may not be used in this expression.
Here is the calculated measure formula for Trend_Rank_Previous_Week:
Any help or suggestions would be greatly appreciated!
@Anonymous
So is it column or measure for Trend_Rank_Previous_Week? You should use measure but seems you created a column for it?
Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
Are this calculations measures or columns? Appears to me that you are maknig a calculated column trying to use a measure, and so the calculation does not return correct result.
Are you abble to share a sample file?
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThe Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 38 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 132 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |