Hauke Verrept Posted July 29, 2021 Share Posted July 29, 2021 Hi all, I have an issue with a histogram I am creating. I am trying to count how often people received a certain type of task over a period to monitor fair distribution. For this we are using a histogram with on the Y-axis a member count Count(Distinct [MemberID]) as On the X-axis we use the following expression:BinByEvenDistance(Count(distinct if([tx_AssignmentCategory]="Flight",[dt_Assignment],NULL)) over (Intersect([MemberID])),3) as [Flight Days] When I adapt the filters in the dashboard to display the correct period it keeps on summing for the entire period (including outside of the filtered period) but disregards people who were not present in the newly filtered period. Example --> 2 MemberIDs - 1 has 400 assignments in 2019/2020, will still show 400 even when only filtered to 2019 (which is not possible since he did 200 in 2019 and 200 in 2020) -2 joined the company in 2019, shows up correctly in data for 2019, is not shown when only filtered to 2020 (this is desired behaviour). Any help would be appreciated. We are working with Spotfire 7.14 Link to comment Share on other sites More sharing options...
Gaia Paolini Posted July 29, 2021 Share Posted July 29, 2021 Without an example dxp I would not be able to help much. Keep in mind that when you put an if clause (or a case statement) in a calculation, anything that is not filtered is not counted. Link to comment Share on other sites More sharing options...
Hauke Verrept Posted July 29, 2021 Author Share Posted July 29, 2021 Hi, thanks for the quick reply. Unfortunately I can not provide .dxp sample file due to confidentiality reasons. The issue seems to be linked to the way we count the days in the expression on the Y axis, it evaluates over all days in the dataset, not the filtered period.... When we do the same but in a barchart showing MemberIDs on the X axis and counts of tasks on the Y axis it works fine... Regards,Hauke Link to comment Share on other sites More sharing options...
Fabian Duerr Posted July 29, 2021 Share Posted July 29, 2021 Please go to the options of your histogram and check the settings for your axis. By default this might be on "all data". Maybe setting it to "current filtering only" will help. Link to comment Share on other sites More sharing options...
Hauke Verrept Posted July 29, 2021 Author Share Posted July 29, 2021 Thanks @Fabd! That solved it :D Kind regards, Hauke Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now