Forum Discussion
itsmeanuj
Helper IV
6 years agoNeed help with Visualization
I have 3 columns in the data Volume YTD Goal YTD 2020 Goal 2000 2200 30000 I want to create a horizontal bar chart (see attached sample) out of these values to show the...
- 6 years ago
Hi itsmeanuj ,
Then measures need to be corrected as below:
2020 Goal1 = VAR a = MAX ( 'Table'[2020 Goal] ) VAR b = MAX ( 'Table'[Goal YTD] ) VAR c = MAX ( 'Table'[Volume YTD] ) RETURN IF ( b > c, a - b, a - c )Goal YTD1 = ABS(MAX('Table'[Goal YTD])-MAX('Table'[Volume YTD]))Volumn YTD1 = IF(MAX('Table'[Goal YTD])>MAX('Table'[Volume YTD]),MAX('Table'[Goal YTD]),MAX('Table'[Volume YTD]))The related .pbix file,pls click here.
Best Regards,
Kelly
v-kelly-msft
Community Support
6 years agoHi itsmeanuj ,
I‘m afraid there isn't a visual that can show exactly the same as you need,but I can show you a workaround.
First, create 2 measures :
Goal YTD1 = MAX('Table'[Goal YTD])-MAX('Table'[Volume YTD])Goal YTD1 = MAX('Table'[Goal YTD])-MAX('Table'[Volume YTD])
Then choose the visual :"stacked bar chart",and put measures and column you need in the visual field:
Finally you will see :
For the related .pbix file,pls click here.
Best Regards,
Kelly
itsmeanuj
Helper IV
6 years agoThanks for your response Kelly. However, there would be situations where YTD goal will be less than Volume YTD. In that scenario how will we show both?
- v-kelly-msft6 years ago
Community Support
Hi itsmeanuj ,
Then measures need to be corrected as below:
2020 Goal1 = VAR a = MAX ( 'Table'[2020 Goal] ) VAR b = MAX ( 'Table'[Goal YTD] ) VAR c = MAX ( 'Table'[Volume YTD] ) RETURN IF ( b > c, a - b, a - c )Goal YTD1 = ABS(MAX('Table'[Goal YTD])-MAX('Table'[Volume YTD]))Volumn YTD1 = IF(MAX('Table'[Goal YTD])>MAX('Table'[Volume YTD]),MAX('Table'[Goal YTD]),MAX('Table'[Volume YTD]))The related .pbix file,pls click here.
Best Regards,
Kelly