working on a project where I want to create measure/DAX of price difference between brands.Using the following data I want to create the price diffrence between Brand A with All other brands for regions.
var _PriceA = CALCULATE(MIN('Table'[Price]),FILTER(ALLSELECTED('Table'),'Table'[Brand Name]="A"))
var _currPrice = MIN('Table'[Price])
if you need more help, please @ me.
Community Support Team _Tang
If this post helps, please consider Accept it as the solution to help the other members find it more quickly.
@BhoomiT , A new column for price of A and then you can take a diff
A price = maxx(filter(Table, [region] =earlier( [region] ) && [Brand Name] ="A") , [Price])
diff = [Price] -[A price]
a measure, if needed
A price = maxx(filter(allselected(Table), [region] =max( [region] ) && [Brand Name] ="A") , [Price])
Thank You Amit,
This is working perfact up to region level filters but, when I tried to calculate it at branch and terittory level ( level down the region) then there is minor deviation in the calculation.
request you to please guide me how can I calculate a measure so that it works for region, branch, terittory filters as well as time filters.
Click here to read more about the October 2021 Release!
Explore the latest tools,training sessions,technical expertise, networking and more.
Mark your calendars and join us for our next Power BI Dev Camp!