Forum Discussion
Anonymous
6 years agoNot applicable
Bar Chart with Variable Target Line
Hi All, I have a hopefulyl a simple problem.... I have 50 Locatons, these are broken into 4 Regions, and 6 Business Divisions. I have the actual performance calcualted and working for each...
Bhuvaraghan
6 years agoFrequent Visitor
Anonymous
I assume you are having a seperate column or a table for targets for each region, division and location. If you are going to give the user an option to single select each of these at a time, you can create a seperate dax for targets refrencing each target:
Target = IF(SELECTEDVALUE('Base Data'[Location])<>"",AVERAGE('Base Data'[Location Target]),
IF(SELECTEDVALUE('Base Data'[Business Division])<>"",AVERAGE('Base Data'[Division Target]),
IF(SELECTEDVALUE('Base Data'[Region])<>"",AVERAGE('Base Data'[Region Target]),5000)))
Selected value checks if a single value is selected from a column, in case all values are selected it returns a blank. Using that locig I have built a nested if to give the output. When there are no selections I have given a common target.Location is selectedRegion is selectedDivision is selected
In case you find this helpful, give a thumps up and mark as solved.
Thanks,
Bhuvaraghan
Vivid Visualization