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'm struggling with this case for quite some time now, hopefully this community got some tricks up their sleves...
So what i wanna do is calculate the savings by subtracting the price year 2 from the price year 1 and multiplying it with the current years bookings.
Another thing that might be good to know is that the prices from year 1 and 2 are measures in the same table.
Thanks for any support!
final =
var sub=[price1]-[price2]
Return
[Count of booking]*Sub
Thanks,
Pravin Wattamwar
If it resolves your problem mark it as solution and give kudos.
Thanks for the quick answer Pravin!
What i was not to clear about was that the measures price1 and price2 are the same. Is it perhaps possible to add a filter to your code?
Thanks
Hi @dannyd
try to
Measure =
var _year1 = 2018
var _year2 = 2019
RETURN
(CALCULATE([price]; YEAR('Table'[Date])=_year1) - CALCULATE([price]; YEAR('Table'[Date])=_year2)) * CALCULATE(Count('Table'[Booking]))
do not hesitate to give a kudo to useful posts and mark solutions as solution
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 |
---|---|
15 | |
10 | |
10 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |