Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
idogridish2
Creator III
Creator III

Add an average bar to bar chart

Hi,

 

is it possible to add a total average bar on a bar chart?

please see an image example below,

this is the expression:

Count(distinct {$<[Date Diff]={"$(=$(vMaxDateDiff))"},[Year Diff]={'$(vMaxYearDiff)'}>}UserID)
/
Count(distinct {$<[Date Diff]={"$(=$(vMaxDateDiff))"},[Year Diff]={'$(vMaxYearDiff)'},[Job Family]=>}UserID)

the user selects one job family and the bars show the ratio of the job family for every country.

idogridish2_0-1608017710724.png

thanks,

Ido.

Labels (1)
1 Solution

Accepted Solutions
Kushal_Chawda

@idogridish2  try below

Create one inline table

load * inline [
Dim
1
2 ];

 

In your bar chart use below dimension

=Pick(Dim,Country,'Overall Average')

 

Use your original expression as it is

View solution in original post

5 Replies
EliGohar
Partner - Creator III
Partner - Creator III

@idogridish2 

Maybe by adding the overall average as a Reference line?

 

idogridish2
Creator III
Creator III
Author

Hi,

 

that is what i did, and i colored the bars with red and green for values above and below that number,

the client is insisting for this presentation.

 

tm_burgers
Creator III
Creator III

If you have access to the data table; you need to add 'Overall Average' as a Country

 

Concatenate (YourDataTable)
LOAD * INLINE [
Country,
Overall Average

];

 

  and then in your Bar Chart, I think you can use the below as your measure.

if(Country='Overall Average',

(Count(TOTAL distinct {$<[Date Diff]={"$(=$(vMaxDateDiff))"},[Year Diff]={'$(vMaxYearDiff)'}>}UserID)
/
Count(TOTAL distinct {$<[Date Diff]={"$(=$(vMaxDateDiff))"},[Year Diff]={'$(vMaxYearDiff)'},[Job Family]=>}UserID)),

(Count(distinct {$<[Date Diff]={"$(=$(vMaxDateDiff))"},[Year Diff]={'$(vMaxYearDiff)'}>}UserID)
/
Count(distinct {$<[Date Diff]={"$(=$(vMaxDateDiff))"},[Year Diff]={'$(vMaxYearDiff)'},[Job Family]=>}UserID))

)

 

Kushal_Chawda

@idogridish2  try below

Create one inline table

load * inline [
Dim
1
2 ];

 

In your bar chart use below dimension

=Pick(Dim,Country,'Overall Average')

 

Use your original expression as it is

idogridish2
Creator III
Creator III
Author

Thank you, great solution.