Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

Current week

Hi all,

I want to display the dimension as  current week  like below

My date field is   Tran_Date

Day1

Day2

Day3

Day4

Day5

Day6       this is current week except sunday

how can I write the calculation condition? 

24 Replies
Anil_Babu_Samineni

Not sure sure your request - But, You can think something like below

WeekDay(DateField) as WeekDay,

Week(DateField) as Week

And measure

Count({<WeekDay -= {'Sun'}, Week = {$(=Max(Week))}>} ID)

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
soniasweety
Master
Master
Author

Hi Anil Samineni


requirement is 


I need to show the chart weekdays  count(id)    with dimension values like  day1 to day6

Anil_Babu_Samineni

Can you provide data set to test?

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
soniasweety
Master
Master
Author

Hi

my data look like below

   

Tran_DateID
1/6/20181
2/6/20182
3/6/20183
4/6/20184
5/6/20185
6/6/20186
7/6/20187
8/6/20188
9/6/20189
10/6/201810
11/6/201811
Anil_Babu_Samineni

This is not you are looking or am i missing something?

Capture.PNG

OR

Capture.PNG

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
soniasweety
Master
Master
Author

can you attach the app ?

Anil_Babu_Samineni

Not sure what App you are expecting? That is straight forward, Anyway PFA

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
soniasweety
Master
Master
Author

but this is not am expecting

the result should be like

input:

LOAD *,WeekDay(Tran_Date) as WeekDay Inline [

Tran_Date, ID

4/6/2018, 4    ----

4/6/2018, 10  -----     here  4th jun 2018  Monday    in chart   Day1 -count 2  result   like that all [excluding sunday]

5/6/2018, 5

5/6/2018, 12

6/6/2018, 6

7/6/2018, 7

8/6/2018, 8

8/6/2018, 16

];

output:

bar chart: 

dim: values

Day1 Means Mon  till  Day6  means sat 

Day1 Day2 Day3 Day4 Day5  Day6       each day count has to show on bar.

Anil_Babu_Samineni

Not clear Can you share real data and expected output to test? That will en count you.

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
soniasweety
Master
Master
Author

in attached sample  expected output drawn.

input value I don't have dayname column   I want to create it from  tran_date field