Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi,
I am new to PowerBi and this is my first time posting here. What a fantastic forum! Thank you all for your time and sharing your knowledge, you really help people out there a lot!
I would like to generate % change from the actual month to the previous months and have therefore created two index columns with Power Query and then used the EARLIER command.
Then I found two wys of calculating % change but the problem is the same, the results should be down by one line.
Here is the second formula:
In the forum it seems like there are possibilities to copy the table and then merge with PowerQuery, but in this case it is the position of the DAX output that is causing me trouble.
Any suggestions are very much appreciated, thank you!
Solved! Go to Solution.
@SuperSusa
Like this
% Change =
VAR CurrentPrice = 'PQ_Bitumen'[Price]
VAR PreviousPrice =
MAXX (
FILTER ( 'PQ_Bitumen', 'PQ_Bitumen'[Index.1] = EARLIER ( 'PQ_Bitumen'[Index] ) ),
'PQ_Bitumen'[Price]
)
RETURN
DIVIDE ( CurrentPrice - PreviousPrice, PreviousPrice )
hi @SuperSusa
try like:
@SuperSusa
Like this
% Change =
VAR CurrentPrice = 'PQ_Bitumen'[Price]
VAR PreviousPrice =
MAXX (
FILTER ( 'PQ_Bitumen', 'PQ_Bitumen'[Index.1] = EARLIER ( 'PQ_Bitumen'[Index] ) ),
'PQ_Bitumen'[Price]
)
RETURN
DIVIDE ( CurrentPrice - PreviousPrice, PreviousPrice )
@tamerj1 this worked perfectly, thank you so much , you saved my day or should I better say my whole week!:)
Hi @SuperSusa
Just interchange between Index and Index.1 like
FILTER ( 'Table', 'Table'[Index.1] = EARLIER ( 'Table'[Index] ) )
this will retrieve the previous row. Then you can easily calculate the difference then the percentage.
Hi,
Thank you for your reply.
I tried, and it comes close now, but thee values do still not come out right. Since the signs were negative, I converted to positive and vice versa via 0- in front of the equation.
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 |
---|---|
19 | |
14 | |
14 | |
11 | |
8 |