Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Dear all, I am new to using dax and was wondering if you could help. In the report below I was trying to calculate the % change where the report is from multiple table sources. The data is in a way so there are multiple dates from each underlying table, hence I just used the month number to remove the issue of showing multiple lines as the sale value is a calculation based on the totals for the month. In this, I was trying to calculate the % change based on the prior row. I have seen many examples of this where a clear date/month / year, is straightforward, although I was trying to do this based on the Line ref (as shown below).
The calculations are as follows:
Hi TamerJ1 , thank you for your help with this, I got the reference number in order, and that worked (thanks, I would have not thought of putting the rankx in the date table by Month & year). But now I have a different (but related issue) in calculating the prior row. The result I get is the same value as the net sales in the same row. I tried removefilter() and all() and I get the same result.
The 'Date'[sRef] is the new fields with the rank (as per the above suggestion. so 'Date'[sRef] -1 gives the correct index. The only challange is getting the correct [Net Sales) which is a calculated measure (not on a table)
Hi @pjukone
easiest way would be by creating a new calculated column in the Date table: Year-Month sequential number. For example you can try
RANKX (
'Date',
'Date'[Year] * 100 + 'Date'[Month],,
ASC,
DENSE
)
then you can minus 1 to get to the orevious month comfortably.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
9 | |
7 | |
7 | |
6 |
User | Count |
---|---|
21 | |
11 | |
10 | |
9 | |
8 |