Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Below is my issue, i have sample data in that same Product has done sales in two stores that is store A and Store B,
My requirement is
*if product has sold in two Store(A&B) i have to show only store A sales only
*If Product has sold in Store A it has to take Store A sales only
* if product has sold in Store B it has to take store B sales only.
How to achieve this
use aggr() to get correct sum at total level,
Try below
Sum(aggr(if (DataSource = 'T_Fact_Food_Delivery_Check',
Sum({<DataSource={'T_Fact_Food_Delivery_Check'}>}[Net Sales Amt]),
Sum({<DataSource={'Fact_Check_Summary_DayPart'}>}[Net Sales Amt])),your_dimension_field))
Try this,
tab1:
LOAD * INLINE [
Store, Product, Sale
A, P1, 10
B, P1, 20
A, P2, 30
B, P3, 40
];
In the Chart:
Hi Saran,
Thanks for response,
actually i have attached senior screenshot i have created two pivot tables one is dimensions second table is fact information, as i have told above requirement i have to show only one value if same product have two sales information i have used mentioned formula it showing fine but when it is coming to total it is not correct, please suggest me if as i am doing any thing wrong
Formula :- if (DataSource = 'T_Fact_Food_Delivery_Check',
Sum({<DataSource={'T_Fact_Food_Delivery_Check'}>}[Net Sales Amt]),
Sum({<DataSource={'Fact_Check_Summary_DayPart'}>}[Net Sales Amt]))
use aggr() to get correct sum at total level,
Try below
Sum(aggr(if (DataSource = 'T_Fact_Food_Delivery_Check',
Sum({<DataSource={'T_Fact_Food_Delivery_Check'}>}[Net Sales Amt]),
Sum({<DataSource={'Fact_Check_Summary_DayPart'}>}[Net Sales Amt])),your_dimension_field))
or try below
sum(aggr(Min([Net Sales Amt]),DataSource,delivery_provider,restarunt_num))
Regards,