
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hard Coded Values
Hi,
I have a variable called 'Company' of which is used as a Filter and this has two options - RI and NT each has there own values. So when I select the individual options, the charts change as expected.
However what I need is one variable 'FC_New' to show a hard coded value of 70 when the filter is not selected.
This is my existing measure logic:
sum({$<CV_Year={$(=YEAR(TODAY()))},[Dash]={'Rate_On'}>}[Budget Value])
I'm assuming I would need to create a new variable like below and call it say 'vRate'
if(getselectedcount([Company])=0,70,1))
and then my measure logic will look something like
sum({$<CV_Year={$(=YEAR(TODAY()))},[Dash]={'Rate_On'}>}[Budget Value]) / $vRate ?
- « Previous Replies
-
- 1
- 2
- Next Replies »
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
May be you need this
If(GetSelectedCount(Company) = 0, 70, Sum({$<CV_Year = {$(=Year(Today()))}, [Dash] = {'Rate_On'}>} [Budget Value]))

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looks good... but just make sure to use $(vRate) instead of $vRate

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, I have tried that but doesn't work, it just adds the values together when the filter hasn't been selected rather than displaying 70


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Try it with:
vRate: if(getselectedcount([Company])=0,0,1))
and then:
alt(sum({$<CV_Year={$(=YEAR(TODAY()))},[Dash]={'Rate_On'}>}[Budget Value]) / $(vRate), 70)
- Marcus

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your suggestion Marcus. I have tried this but the values still seem to add up.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It should work - at least if I use the following as dummy:
= alt(100 / GetSelectedCount(Application), 70)
it worked. Therefore check if you use the right field/variable or if there is any typo or something similar.
- Marcus

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What I should see when selecting the filters are -
Company:
RI = 75
RT = 65
When the company hasn't been selected I should see 70 (as the hardcoded value)
What is happening with the logic used is this
RI = 70
RT = 70
No filter selected = 140

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- « Previous Replies
-
- 1
- 2
- Next Replies »