Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
i have two expressions in bar chart
=sum({<IsSameMonth={'1'}>}sales)
=sum({<IsRolling6={'1'} ,IsPr={'1'} >}sales)
i want to convert these two expressions into a single expression is it possible
Yes, you should be able to use a synthetic dimension or Island table as dimension and use Pick(Match()) to display both these expression within a single expression
Hi Sunny can u please provide me an example please
i'm struggling with this since the last 1 week and your help will be highly appreciated
Hahahahha, John it would be nice if you can provide me with what you have and I can show how it can be done . It will be time consuming for me to create a sample and then even after I do create one, we won't know if it matches your requirement on not. I don't have that sort of time my friend. Please help me help you by providing me a sample where I can help you out.
Best,
Sunny
=sum({<IsSameMonth={'1'}, IsRolling6={'1'} , IsPr={'1'} >} sales) gives you sum of sales for all three conditions
sum({<IsSameMonth={'1'}>} + <IsRolling6={'1'}> + <IsPr={'1'}> } sales) gives common values....
Hi Sunny
My problem started with this and going on
Top two values in current month comparing the same values with previous month
I'm struggling to get this solution
there is a solution in place which fits me
but
1. i'm getting multiple legends for each month i want a single consolidated legend
2. the colour of the bars if the same country is in both the months it should have same colour
please help me out
Wow this is from a while ago. I am willing to help John, all I need is a sample (with actual or dummy data), but something to work with
Hi Sunny this is how i have written my code in the data model
a:
LOAD * INLINE [
Country, Date, Value
Argentina,Jul2016,650
Japan,Jul2016,300
America,Jul2016,200
Argentina,Jun2016,550
Japan,Jun2016,200
America,Jun2016,100
America,May2016,300
Argentina,May2016,250
Japan,May2016,150
America,Apr2016,200
Argentina,Apr2016,170
Japan,Apr2016,210
];
Temp:
Load
min(Date) as minDate,
max(Date) as maxDate
Resident keytable;
Let varMinDate = Num(Peek('minDate', 0, 'Temp'));
Let varMaxDate = Num(Peek('maxDate', 0, 'Temp'));
DROP Table Temp;
TempCalendar:
LOAD
$(varMinDate) + Iterno()-1 As Num,
Date($(varMinDate) + IterNo() - 1) as TempDate
AutoGenerate 1 While $(varMinDate) + IterNo() -1 <= $(varMaxDate);
MasterCalendar:
Load
TempDate AS Date,
week(TempDate) As Week,
Year(TempDate) As Year,
Month(TempDate) As Month,
Resident TempCalendar
Order By TempDate ASC;
Drop Table TempCalendar;
tmpAsOfCalendar:
Load distinct Month1 Resident MasterCalendar ;
// ======== Cartesian product with itself ========
Join (tmpAsOfCalendar)
Load Month1 as AsOfMonth
Resident tmpAsOfCalendar ;
// ======== Reload, filter and calculate additional fields ========
[As-Of Calendar]:
Load Month1,
AsOfMonth,
-([AsOfMonth]<>[Month1]) as [IsPrev51],
Round((AsOfMonth-Month1)*12/365.2425) as MonthDiff,
// Date(Date#(MonthYear,'MMMYYYY'),'YYYYMM') as MonthYearq,
Year(AsOfMonth)-Year(Month1) as YearDiff
Resident tmpAsOfCalendar
Where AsOfMonth >= Month1;
Drop Table tmpAsOfCalendar;
below is my output
and the problem with this is the legend is not worthy if i'm comparing top5 then it is becomoing clumpsy
and the colour of the same countries should be same in different months where as it is not
please help me out
Give me some time to digest this and I will try to get back to you as soon as I can.
ok sunny please dont forget