Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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!
I found a way to fix it. Thank you!!!
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