Forum Discussion
Incorrect Status based on Minimum value
Can someone please assist?
bump
- HotChilli7 years agoCommunity Champion
If you have a measure and a calculated column here (which I think you do), the column will be static from the moment it is created. The measure will change according to context. I think that you want the Status to reflect changes in the measure (which it can't currently do).
There are two approaches: Make all features you require 'calculated columns' i.e. Min Price Per Store, Min Price Per City, Status v. Price Per Store, Status v. Price Per City. You'll have to go this way if you want to put any of the Status fields in a slicer.
OR
Make the two fields that you created both measures.
- Anonymous7 years agoNot applicable
Thank you so much HotChilli! I will give this a shot when i reach home and will keep you posted on how I go.
- v-chuncz-msft7 years agoCommunity Support
- Anonymous7 years agoNot applicable
Hi HotChilli,
You are right, the min value calculation is done using a measure and the Status is calculated using a calculated column. I need to be able to use "Status" as a slicer so I dont know if I can calculate Status as a measure.
I tried using a calculated column to calculate min value and it just wouldnt show the right numbers.
Screenshot with stores with new calculations:
Screenshot without stores with new calculations:
I was hoping to get the results as below for
-without stores
with stores -
Link to pbix file here:
https://drive.google.com/open?id=12E1eD1Gy88OUvmcalzO_e_mJ3rRKveGP
Thank you so much for your help here HotChilli.
Please let me know your thoughts here.
- HotChilli7 years agoCommunity Champion
I think you've solved the 'with stores' column formula.
The same formula won't work for 'without stores'. Remember, you will need 2 columns if you're going down this route.
The other column would be
Chilli1.1 NEW - Min Price = CALCULATE(MIN(Data[Store Price]),ALLEXCEPT(Data,Data[Barcode],Data[City],Data[Match Type]))
I think (though please test at your side)