Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a data structure in my load that looks something like this:
Location | buiseness | Sales Percentage |
---|---|---|
USA | widgets | 25% |
USA | whosits | 50% |
Germany | widgets | 30% |
Germany | whosits | 15% |
I need a table that looks something like this:
Business | USA | Germany |
---|---|---|
widges | 25% | 30% |
whosits | 50% | 15% |
is there a way that I can adjust the data to do this?
LOad buiseness,MaxString(If(Location='USA',[Sales Percentage])) As USA,MaxString(If(Location='Germany',[Sales Percentage])) As Germany Group By buiseness;
Load * Inline [
Location,buiseness,Sales Percentage
USA,widgets,25%
USA,whosits,50%
Germany,widgets,30%
Germany,whosits,15% ];
Use Pivot table
Dimension 1 =Business
Dimension 2= Location
expression as sales percentage
If you want it to be in the script then follow the below thread
Please find the attached QVW for your reference
Hi,
Create Straight Table
use Dimension Business,
then 1 : Expression for USA= Sum({<Location={"USA"}>}Sales)
2 : Expression for Germany= Sum({<Location={"Germany"}>}Sales)
Or
Create Pivot Table
use dimesion 1 as Business
dimension 2 as Location
and expression as Sales
Then drag you second dimension to Horizontal from vertical
and go to presentation select always Fully Expanded
Regards