Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateJoin 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.
Hi,
I'm very new to this PowerBI and I need your help.
So I have this data of variable cost and revenue from different products and different month. So I want to subtract the Q1 Value from 2nd month and previous month for each product. For example for Variable cost for biscuit the difference is 6000 (this month) - 5000 (last month) = 1000.
The desired outcome is shown on the right column.
Kindly need your help on this.
Thank you
Solved! Go to Solution.
Hi @Anonymous ,
Create a measure like this:
Desired Result =
var previousmonthvalue=CALCULATE(SUM(Data[Q1]),FILTER(ALLEXCEPT(Data,Data[Status],Data[Product]),Data[Month]=SELECTEDVALUE(Data[Month])-1))
return IF(ISBLANK(previousmonthvalue),0,SUM(Data[Q1])-previousmonthvalue)
This will give you the desired output:
Please accept this as a solution if your question has been answered !!
Appreciate a Kudos 😀
Hi @Anonymous ,
Create a measure like this:
Desired Result =
var previousmonthvalue=CALCULATE(SUM(Data[Q1]),FILTER(ALLEXCEPT(Data,Data[Status],Data[Product]),Data[Month]=SELECTEDVALUE(Data[Month])-1))
return IF(ISBLANK(previousmonthvalue),0,SUM(Data[Q1])-previousmonthvalue)
This will give you the desired output:
Please accept this as a solution if your question has been answered !!
Appreciate a Kudos 😀
Hi @Anonymous ,
Previous month Sale= CALCULATE(SUM(Table(Q1), PARALLELPERIOD(Table(Month), -1, Month)
Current month= SUM(Table(Q1))
Difference= Current month - Previous month Sale
Mark this as a solution, if I answered your question. Kudos are always appreciated.
Thanks!
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
16 | |
8 | |
7 | |
7 | |
6 |
User | Count |
---|---|
23 | |
11 | |
10 | |
10 | |
8 |