Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, hopefully someone can show me where I'm going wrong.
I have a chart that successfully shows only last 7 days based on a flag in the data using this set analysis:
Num(Sum({< [%Last 7 Days Flag] = {"Y"}>}[Transaction Volume]), '#,##0')
What I want to do is if a date is selected, then ignore the default and display as per the selection.
I tried the below to get the evaluate selected count and then show volumes depending on the result
if(GetSelectedCount([Transaction Date]) >0,
Num(Sum([Transaction Volume]), '#,##0'),
Num(Sum({< [%Last 7 Days Flag] = {"Y"}>}[Transaction Volume]), '#,##0')
)
This works when a date is selected, however if no date is selected the set analysis that worked before now displays all dates, but only values for the last 7 days and all the non 7 day values are showing as 0 and are not nulls.
I'm confused why it would work outside of the if statement, but behave differently within it.
Here is how the chart looks with the set analysis on it's own out of the if condition
Within the if condition, this now looks like this (The last 7 days are waaay over the right 🙂 )
Anybody have an idea?
Thanks.
Hi Mikeslade
if you Limit your Dimension with a formula like in the attached image, you should get, what you're looking for.
Regards
Dirk
Hi,
Did you try to suppress null values in the measure?
Thanks - I did try that, as I said in the post the strange thing is they are all showing 0 as values, and not nulls. (Interestingly, they are not actually 0, and if you select one of the dates then you it will work and show the true value.)
Just so we get this right, you are unchecking 'Include zero values' under Add-ons -> Data handling, correct?
Hi Mikeslade
if you Limit your Dimension with a formula like in the attached image, you should get, what you're looking for.
Regards
Dirk
Just so I get this right, that would exclude genuine zero values?
Gah! Should have thought of that! Thanks.
I still don't quite understand why it doesn't work the way I tried originally, but thank you.
Arggh how do I unaccept this as solution!
Hi Mikeslade
does your last post mean, your problem is still not solved?
If you click on the 3 vertical dots, it gives you a context menu, where you can remove the solution flag.
Regards
Dirk
Oh No... you resolved, but I somehow managed to mark my own reply as a solution!! Figured it out and removed the solution against my response!
Thank you!