Shri G Posted September 15, 2023 Share Posted September 15, 2023 Hi All,Please find attached sample data. I have to create cross table for Travel and Work hours based on type CR and PM "Site","Type","Work Hrs","Travel Hrs""L102","CR","1.5","1.25""L102","CR","1.75","1""L102","CR","1.5","1""L102","CR","7.5","2""L102","CR","1","1""L102","CR","1.25","2.75""L102","CR","3.75","2.25""L102","CR","1","0""L102","PM","2","4""L102","PM","7.5","2""L102","PM","1","1""L102","PM","1.25","2.75""L102","PM","4.24","4.75""L102","PM","3.75","2.25""L102","PM","1","0""L102","PM","1.5","1" I have created calculated columnsPM Work Hrs:case WHEN [Type]='PM' THEN Sum([Work Hrs]) OVER ([site]) ENDPM Travel Hrs:case WHEN [Type]='PM' THEN Sum([Travel Hrs]) OVER ([site]) ENDCR Work Hrs :case WHEN [Type]='CR' THEN Sum([Work Hrs]) OVER ([site]) ENDCR Travel Hrs:case WHEN [Type]='CR' THEN Sum([Travel Hrs]) OVER ([site]) ENDThese calculated values are giving me the correct output, these cross table values are changing for all filters except hierarchy filters. I have created Date and Geography filters. For these filters whenever I select/Deselect values, that is not reflecting in Cross tableCan somebody please help me with this?Thanks in advance! Link to comment Share on other sites More sharing options...
Jose Leviaguirre Posted September 15, 2023 Share Posted September 15, 2023 Try to use intersect on all your expressions. For example:Sum([Work Hrs]) OVER (Intersect([site], All([Type])) WHEN [Type] = "PM") Link to comment Share on other sites More sharing options...
Shri G Posted September 15, 2023 Author Share Posted September 15, 2023 Hi Jose,Thank you so much for your reply.This expression isn't working, getting 'Expected ) but found WHEN on line 1' error. I tried with syntax as well Link to comment Share on other sites More sharing options...
Fredrik Rosell Posted September 19, 2023 Share Posted September 19, 2023 Hello,"I have to create cross table for Travel and Work hours based on type CR and PM"Just to confirm something very basic first - do you need to use Calculated columns or can you just split your cross table to show what you need, using custom expressions on the axes where needed? Added a fake L103 Site to get some additional data. 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