applying calculated field when filtering
Hi there,
I have 2 calculated columns and 1 calculated measure.
When I don't apply any filters to the data, the calculations all work correctly - however, when I filter the data to a particular location, the calculated columns don't seem to calculate the numbers i want them to.
For example, i have Location A, B and C. When there is no filter, the calculated column and measure works fine, and uses the data from all 3 locations. Yet, when I filter to location A, i only want the calculated column and measure to use only the data associated with Location A - at the moment, it doesn't seem to be doing this and is using all the data, particularly when i look at the calculated columns
Can I please get some help with this?
Thanks,
Hi jagdeep,
I made one sample for your reference. We can create measures to work on it.
Sales% new = CALCULATE(SUM('Relative Index'[Sales]))/CALCULATE(SUM('Relative Index'[Sales]),ALLSELECTED('Relative Index'))Population% new = CALCULATE(SUM('Relative Index'[Population])/CALCULATE(SUM('Relative Index'[Population]),ALLSELECTED('Relative Index')))RI NEW = [Sales% new]/[Population% new]
For more details, please check the pbix as attached.
Regards,
Frank