Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a variable like this:
{<[Total Value]={">1000000"}>}
I am then taking that variable and using it to calculate a KPI like this:
=Count({<[Category]={'Auto'}> * $($(vFilter))}[SA Title])
The KPI should count all of the Auto columns with a total cost over 1000000.
When I get the expression back, it comes in like this:
=Count({<[Category]=['Auto']> * {<[Total Value]={">1000000"}>}}[Title])
The {...} around the <[Total Value] section is throwing errors. I have the {} in there because this also filters a table and that works correctly. Is there a way to remove the {} from the variable when I do the count for the KPI?
You're right, that will not get after first }. try this instead:
$(=right(left('$(vFilter)', len('$(vFilter)') - 1), len('$(vFilter)') - 2))
=Count({<[Category]={'Auto'}> * $(=right(left('$(vFilter)', len('$(vFilter)') - 1), len('$(vFilter)') - 2)) }[SA Title])
$(=textbetween('$(vFilter)','{', '}',1))
=Count({<[Category]={'Auto'}> * $(=textbetween('$(vFilter)','{', '}',1)) }[SA Title])
Unfortunately, that expresses to:
=Count({<[Category]=['Auto']> * - }[Title])
and says there is an error in the expression: '}' expected
You're right, that will not get after first }. try this instead:
$(=right(left('$(vFilter)', len('$(vFilter)') - 1), len('$(vFilter)') - 2))
=Count({<[Category]={'Auto'}> * $(=right(left('$(vFilter)', len('$(vFilter)') - 1), len('$(vFilter)') - 2)) }[SA Title])
That did the trick thank you so much!
Great. please mark correct solution so thread can be closed.
May be this works as well, not sure -
=Count({<[Category]={'Auto'}> * $(=replace('$(vFilter)','{<','<'))[SA Title])