Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

how to use

Hi all,

Miguel Angel Baeyens de Arce

Bala Bhaskar

i want to use variable in alternate state expreession   below i tried but no luck   how to use?

=Sum({<[Name] -= {"=len(trim([Name]))=0"},[L1]=$::[L1],[SRn]=$::[SRn],FormatId=$::FormatId>}[Amount])
/$(vFormatId)



variable  is not workibng  here    but when i hardcode the value  its working   



if i use variable data not showing anything


//1000000
//$(vFormatId)
//only({<FormatId=$::FormatId>}FormatId)



variable:  vFormatId=FormatId


format id is field  and having values  1000000,1000



1 Solution

Accepted Solutions
sunny_talwar

If you make selection in FormatId in inherited state, then may be try this

=Sum({<[Name] -= {"=len(trim([Name]))=0"}, [L1] = $::[L1], [SRn] = $::[SRn], FormatId = $::FormatId>}[Amount])/Only({$} FormatId)

View solution in original post

13 Replies
balabhaskarqlik

May be try like this:

1. Change variable like:

vFormatId = Only(FormatId); use this in expr as: $(vFormatId)

OR

2. only({<FormatId=$::FormatId>}Amount)

OR

3. Aggr(Only({1<FormatId = p(FormatId)>}Amount),Amount)

vishsaggi
Champion III
Champion III

variable cannot hold multiple values at a time unless you use some Concat() or Aggregate functions like Min Max(). So when you divide sum()/$(formatid) what is the value you want to divide this by?

soniasweety
Master
Master
Author

formatid  is a field having two values  1000  and 1000000

i want to divide the value  sum()/1000  and 1000000

my report  need to show  millions and thousands  when user selects thousands it should show  thousands

and same for millions

soniasweety
Master
Master
Author

3 not working    null it is showing

soniasweety
Master
Master
Author

hi

Felip Drechsler

Marco Wedel

Sunny Talwar  do you have any help on this?

vishsaggi
Champion III
Champion III

‌so you have only two values in your field formatid 1000 and 100000. Why don’t you just use sum()/formatid did you try this way? Don’t use any variable.

soniasweety
Master
Master
Author

tried but its  also showing nothing

soniasweety
Master
Master
Author

Hi Bala Bhaskar   its not working i tried your 3 expressions

sunny_talwar

So, FormatId is selected in the inherited state or another alternate state? The chart is in inherited state or Alternate State?