Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Data load editor expression

 

Do you know how to modify this set analysis expression, so it will work in the Data Load Editor instead?

If(Sum({$<CategoryName={

'Womens wear',

'Sportwear',

'Bath Clothes',

'Ladies´Footwear',

'Children´s wear',

'Babywear'

}>}Sales)

= 0,'',Sum({$<CategoryName={

'Womens wear',

'Sportwear',

'Bath Clothes',

'Ladies´Footwear',

'Children´s wear',

'Babywear'

}>}Sales)

)

 

Here is the data

CategoryName

Sales

Men´s Clothes

-$5,809.44

Womens wear

$394.13

Womens wear

$1,308.29

Womens wear

$1,842.34

Womens wear

$5,809.44

Womens wear

$9,035.75

Sportwear

$1,308.29

Sportwear

$9,035.75

Sportwear

$5,809.44

Bath Clothes

$1,842.34

Ladies´Footwear

$1,308.29

Ladies´Footwear

$1,842.34

Children´s wear

$394.13

Babywear

$55.94

Babywear

$1,308.29

Babywear

$198.98

Men´s Clothes

-$476.50

Men´s Clothes

-$927.71

 

Here is the end result I want to create using the Data Load Editor

CategoryName

Sales

Totals

$41,494

Babywear

$1,563

Bath Clothes

$1,842

Children´s wear

$394

Ladies´Footwear

$3,151

Men´s Clothes

 

Sportwear

$16,153

Womens wear

$18,390

 

2 Replies
Thiago_Justen_

What about this:

Load
CategoryName,
If(Match (CategoryName,'Womens wear',
'Sportwear',
'Bath Clothes',
'Ladies´Footwear',
'Children´s wear',
'Babywear') and NumSum (Sales)>0, Sum(Sales)) as SumSales
From YourTable Group By CategoryName;

Or you could also try this:

Load
CategoryName,
Sum (Sales)
From YourTable Where Match (CategoryName,'Womens wear',
'Sportwear',
'Bath Clothes',
'Ladies´Footwear',
'Children´s wear',
'Babywear') Group By CategoryName;
Thiago Justen Teixeira Gonçalves
Farol BI
WhatsApp: 24 98152-1675
Skype: justen.thiago
Anil_Babu_Samineni

As per your data, I don't think so - Why you have written that many lines. Create straight table with

Dimension - CategoryName

Measure - Sum(Sales)

If you want to restrict only these categories do this way?

Sum({<CategoryName = {'Babywear', 'Bath Clothes', 'Children´s wear', 'Ladies´Footwear',
'Men´s Clothes', 'Sportwear', 'Womens wear'}>} Sales)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful