Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a database like this
Student Name | Subject | Result |
A | Math | 100 |
A | Science | 90 |
B | Math | 95 |
B | Science | 80 |
And I want to put it in a table like this
Student Name | Math | Science |
A | 100 | 90 |
B | 95 | 80 |
is there a way to do this without changing the back end? I only have access to the front end
so far what I do is use the if function
if(Subject = 'Math', Result, null()) & if(Subject = 'Science', Result, null())
but the result is like this
Student Name | Math | Science |
A | 100 | - |
A | - | 90 |
B | 95 | - |
B | - | 80 |
please help. Thankyou
Hi Caramel_mumu,
may be you may convert data in script side and get what you want.
First, I found student A result and then found student B result and keep results in two fields (math and science).
then I Concatenate the results and get the final result.
regards.
you can try the following
Dimension: [Student Name]
Measure1: sum({< Subject={'Math'} >} Result)
Measure2: sum({< Subject={'Science'} >} Result)
but, its better to be done by script by using Generic Load
Hope it helps,
help users find answers! Don't forget to mark a solution that worked for you & to smash the like button! 😁
hi, thankyou
but I've tried this and it produced the same result like what I've showed in my question 😞
Hi
@RafaelBarrios solution will work..
Include only one dimension - Student Name and 2 measures [1 for Math & 1 for Science]