Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
kavita25
Partner - Specialist
Partner - Specialist

3Month loss...

Hi,

I want to show volume loss for dealers..i.e If the dealer is billed in May and no sale in next 3 months i.e Jun,Jul, Aug.

So for that dealer is loss for the month of May.

In simple words if May is >0 and Jun,Jul,Aug sale is <0 then it is loss for that month..

Similarly I have to show for Jun and next 3 months, Jul..and so on...

My dimension is Month field..

swuehl‌ - You helped me to get next 3 months bill..How to show repeat purchase.. in this post..

Kindly suggest me to solve this issue...where the next 3 months is in loss..

Regards,

Kavita

23 Replies
vinieme12
Champion III
Champion III

Like below

=AVG({<DistributorCode = {"=sum([Total Turn Over]) > 0 and sum({<InvMonth,InvMonth = {">$(vSelectedMonth)<=$(vEndMonth)"}>}[Total Turn Over])=0"}>}1)

Create a field to have numeric values of each month

where;

vSelectedMonth = Num of selected InvMonth

vEndMonth = $(vSelectedMonth)+3

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
kavita25
Partner - Specialist
Partner - Specialist
Author

My dimension is month field..

It should show distinct count of outlet code if May has sale (white part) and  if Jun,Jul,Aug has no sale (i.e in grey).

same it should calculate for all the months.

For e.g 9110012201324 this code has sale on Feb Month, but no sale in Mar,Apr and May month..

So the bar chart for this dealer code will be shown in Feb month only and not rest of the month coz rest of the month has data.

Regards,

Kavita

vinieme12
Champion III
Champion III

Use the same

=Count({<DistributorCode = {"=sum([Total Turn Over]) > 0 and sum({<InvMonth,InvMonth = {">$(vSelectedMonth)<=$(vEndMonth)"}>}[Total Turn Over])=0"}>}DistributorCode )

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
kavita25
Partner - Specialist
Partner - Specialist
Author

Its showing some error in set modifier...

kavita25
Partner - Specialist
Partner - Specialist
Author

Expression Used:

=Count(distinct {<[DMS Outlet Code] = {"=sum(Qty) > 0 and sum({<InvFiscal_Month,InvFiscal_Month = {">$(vSelectedMonth)<=$(vEndMonth)"}>}Qty)=0"}>}[DMS Outlet Code] )

vSelectedMonth =num(InvFiscal_Month)

vEndMonth =$(vSelectedMonth)+3

vinieme12
Champion III
Champion III

check the attached

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
kavita25
Partner - Specialist
Partner - Specialist
Author

Its not working..as per the logic...

9110012201315 this has value for Aug Sep Oct Nov..so this should not come...

Coz its next 3 month if I start from May has no value till Jul and Aug to Nov has value...

My logic is it should have sale for the particular month and next 3 month should not have sale...

vinieme12
Champion III
Champion III

you need to make a selection in the Month field!!

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
kavita25
Partner - Specialist
Partner - Specialist
Author

Yess...