Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Ethel
Creator III
Creator III

graph depends on toggle

Hello, could you please help me with a problem.

I  have a toggle 'percent/count' and a bar chart for 5 years. The formula should be the following

if(wildmatch(PercentCount,'Count') ,

sum({Year= {">=$(=vPriorFiveYear)<=$(=vYear)"}>}[Count])
,
sum({ Year={">=$(=vPriorFiveYear)<=$(=vdYear)"}>}[# Count])/
sum(total <Year> {Year={">=$(=vPriorFiveYear)<=$(=vPeriodYear)"}>}[# Count]))

 

If I create graphs separately, than in every case I have a chart with five bars. But If I add condition "if", than the first graph in condition shows only column for the last year instead of 5 column. Any ideas why it happens and how to fix it?

Thanks a lot in advance!

Labels (4)
11 Replies
Ethel
Creator III
Creator III
Author

I found a way to fix it. Thank you!!!

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi @Ethel 

Pleased to hear that it is working. I'm happy to have been able to help.

You need to ensure that the number formatting on the measure is set to Auto, so that it uses the num function rather than applying a format to the chart.

You should also change the if statement where it is applying the percent symbol so that it is the same as the other statement, i.e. & if('$(=minstring(PercentCount))' = 'Count', '', '.0%').

Hope that fixes it.

Cheers,
Steve